idnits 2.17.1 draft-irtf-cfrg-dragonfly-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- -- The document has an IETF Trust Provisions (28 Dec 2009) Section 6.c(i) Publication Limitation clause. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 11, 2014) is 3448 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 5996 (Obsoleted by RFC 7296) Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Research Task Force D. Harkins, Ed. 3 Internet-Draft Aruba Networks 4 Intended status: Informational November 11, 2014 5 Expires: May 15, 2015 7 Dragonfly Key Exchange 8 draft-irtf-cfrg-dragonfly-05 10 Abstract 12 This document specifies a key exchange using discrete logarithm 13 cryptography that is authenticated using a password or passphrase. 14 It is resistant to active attack, passive attack, and off-line 15 dictionary attack. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on May 15, 2015. 34 Copyright Notice 36 Copyright (c) 2014 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 This document may not be modified, and derivative works of it may not 50 be created, except to format it for publication as an RFC or to 51 translate it into languages other than English. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 57 1.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 3 58 1.2.1. Notations . . . . . . . . . . . . . . . . . . . . . . 3 59 1.2.2. Resistance to Dictionary Attack . . . . . . . . . . . 3 60 2. Discrete Logarithm Cryptography . . . . . . . . . . . . . . . 4 61 2.1. Elliptic Curve Cryptography . . . . . . . . . . . . . . . 4 62 2.2. Finite Field Cryptography . . . . . . . . . . . . . . . . 5 63 3. The Dragonfly Key Exchange . . . . . . . . . . . . . . . . . 6 64 3.1. Assumptions . . . . . . . . . . . . . . . . . . . . . . . 7 65 3.2. Derivation of the Password Element . . . . . . . . . . . 8 66 3.2.1. Hunting and Pecking with ECC Groups . . . . . . . . . 10 67 3.2.2. Hunting and Pecking with MODP Groups . . . . . . . . 12 68 3.3. The Commit Exchange . . . . . . . . . . . . . . . . . . . 13 69 3.4. The Confirm Exchange . . . . . . . . . . . . . . . . . . 14 70 4. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 15 71 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 15 73 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 74 7.1. Normative References . . . . . . . . . . . . . . . . . . 16 75 7.2. Informative References . . . . . . . . . . . . . . . . . 16 76 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 17 78 1. Introduction 80 Passwords and passphrases are the predominant way of doing 81 authentication in the Internet today. Many protocols that use 82 passwords and passphrases for authentication exchange password- 83 derived data as a proof-of-knowledge of the password (for example, 84 [RFC5996], and [RFC5433]). This opens the exchange up to an off-line 85 dictionary attack where the attacker gleans enough knowledge from 86 either an active or passive attack on the protocol to run through a 87 pool of potential passwords and compute verifiers until it is able to 88 match the password-derived data. 90 This protocol employs discrete logarithm cryptography to perform an 91 efficient exchange in a way that performs mutual authentication using 92 a password but is resistant to an off-line dictionary attack. 94 1.1. Requirements Language 96 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 97 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 98 document are to be interpreted as described in RFC 2119 [RFC2119]. 100 1.2. Definitions 102 1.2.1. Notations 104 The following notations are used in this memo 106 password 107 A shared, secret and potentially low-entropy word, phrase, code 108 or key used as a credential to mutually authenticate the peers. 109 It is not restricted to characters in a human language. 111 a | b 112 denotes concatenation of string "a" with string "b". 114 len(a) 115 indicates the length in bits of the string "a". 117 lsb(a) 118 returns the least-significant bit of the bitstring "a". 120 lgr(a,b) 121 takes "a" and a prime, b and returns the legendre symbol (a/b). 123 min(a,b) 124 returns the lexicographical minimum of strings a and b, or zero 125 (0) if a equals b. 127 max(a,b) 128 returns the lexicographical maximum of strings a and b, or zero 129 (0) if a equals b. 131 The convention for this memo to represent an element in a finite 132 cyclic group is to use an upper-case letter or acronym, while a 133 scalar is indicated with a lower-case letter or acronym. An element 134 that represents a point on an elliptic curve has an implied composite 135 nature-- i.e. it has both an x- and y-coordinate. 137 1.2.2. Resistance to Dictionary Attack 139 Resistance to dictionary attack means that any advantage an adversary 140 can gain must be directly related to the number of interactions she 141 makes with an honest protocol participant and not through 142 computation. The adversary will not be able to obtain any 143 information about the password except whether a single guess from a 144 protocol run is correct or incorrect. 146 2. Discrete Logarithm Cryptography 148 Dragonfly uses discrete logarithm cryptography to achieve 149 authentication and key agreement (see [SP800-56A]). Each party to 150 the exchange derives ephemeral keys with respect to a particular set 151 of domain parameters (referred to here as a "group"). A group can be 152 based on Finite Field Cryptography (FFC) or Elliptic Curve 153 Cryptography (ECC). 155 Three operations are defined for both types of groups: 157 o "scalar operation"-- takes a scalar and an element in the group to 158 produce another element-- Z = scalar-op(x, Y). 160 o "element operation"-- takes two elements in the group to produce a 161 third-- Z = element-op(X, Y). 163 o "inverse operation"-- takes an element and returns another element 164 such that the element operation on the two produces the identity 165 element of the group-- Y = inverse(X). 167 2.1. Elliptic Curve Cryptography 169 Domain parameters for the ECC groups used by Dragonfly are: 171 o A prime, p, determining a prime field GF(p). The cryptographic 172 group will be a subgroup of the full elliptic curve group that 173 consists of points on an elliptic curve -- elements from GF(p) 174 that satisfy the curve's equation -- together with the "point at 175 infinity" that serves as the identity element. The group 176 operation for ECC groups is addition of points on the elliptic 177 curve. 179 o Elements a and b from GF(p) that define the curve's equation. The 180 point (x, y) in GF(p) x GF(p) is on the elliptic curve if and only 181 if (y^2 - x^3 - a*x - b) mod p equals zero (0). 183 o A point, G, on the elliptic curve, which serves as a generator for 184 the ECC group. G is chosen such that its order, with respect to 185 elliptic curve addition, is a sufficiently large prime. 187 o A prime, q, which is the order of G, and thus is also the size of 188 the cryptographic subgroup that is generated by G. 190 An (x,y) pair is a valid ECC element if: 1) the x- and y-coordinates 191 are both greater than zero (0) and less than the prime defining the 192 underlying field; and, 2) the x- and y-coordinates satisfy the 193 equation for the curve and produce a valid point on the curve that is 194 not the point at infinity. If either one of those conditions do not 195 hold the (x,y) pair is not a valid element. 197 The scalar operation is addition of a point on the curve with itself 198 a number of times. The point Y is multiplied x-times to produce 199 another point Z: 201 Z = scalar-op(x, Y) = x*Y 203 The element operation is addition of two points on the curve. Points 204 X and Y are summed to produce another point Z: 206 Z = element-op(X, Y) = X + Y 208 The inverse function is defined such that the sum of an element and 209 its inverse is "0", the point-at-infinity of an elliptic curve group: 211 R + inverse(R) = "0" 213 Elliptic curve groups require a mapping function, q = F(Q), to 214 convert a group element to an integer. The mapping function used in 215 this memo returns the x-coordinate of the point it is passed. 217 scalar-op(x, Y) can be viewed as x iterations of element-op() by 218 defining: 220 Y = scalar-op(1, Y) 222 Y = scalar-op(x, Y) = element-op(Y, scalar-op(x-1, Y)), for x > 1 224 A definition of how to add two points on an elliptic curve (i.e. 225 element-op(X, Y)) can be found in [RFC6090]. 227 Note: There is another elliptic curve domain parameter, a co-factor, 228 h, that is defined by the requirement that the size of the full 229 elliptic curve group (including "0") be the product of h and q. 230 Elliptic curve groups used with Dragonfly authentication MUST have a 231 co-factor of one (1). 233 2.2. Finite Field Cryptography 235 Domain parameters for the FFC groups used in Dragonfly are: 237 o A prime, p, determining a prime field GF(p), the integers modulo 238 p. The FFC group will be a subgroup of GF(p)*, the multiplicative 239 group of non-zero elements in GF(p). The group operation for FFC 240 groups is multiplication modulo p. 242 o An element, G, in GF(p)* which serves as a generator for the FFC 243 group. G is chosen such that its multiplicative order is a 244 sufficiently large prime divisor of ((p-1)/2). 246 o A prime, q, which is the multiplicative order of G, and thus also 247 the size of the cryptographic subgroup of GF(p)* that is generated 248 by G. 250 A number is a valid element in an FFC group if: 1) it is between one 251 (1) and one (1) less than the the prime, p, exclusive (i.e. 1 < 252 element < p-1); and, 2) if modular exponentiation of the element by 253 the group order, q, equals one (1). If either one of those 254 conditions do not hold the number is not a valid element. 256 The scalar operation is exponentiation of a generator modulo a prime. 257 An element Y is taken to the x-th power modulo the prime returning 258 another element, Z: 260 Z = scalar-op(x, Y) = Y^x mod p 262 The element operation is modular multiplication. Two elements, X and 263 Y, are multiplied modulo the prime returning another element, Z: 265 Z = element-op(X, Y) = (X * Y) mod p 267 The inverse function for a MODP group is defined such that the 268 product of an element and its inverse modulo the group prime equals 269 one (1). In other words, 271 (R * inverse(R)) mod p = 1 273 3. The Dragonfly Key Exchange 275 There are two parties to the Dragonfly exchange named, for 276 convenience and by convention, Alice and Bob. The two parties have a 277 shared password that was established in an out-of-band mechanism and 278 they both agree to use a particular domain parameter set (either ECC 279 or FFC). In the Dragonfly exchange both Alice and Bob share an 280 identical view of the shared password-- i.e. it is not "augmented", 281 where one side holds a password and the other side holds a non- 282 invertable verifier. This allows Dragonfly to be used in traditional 283 client-server protocols and also in peer-to-peer applications in 284 which there are not fixed roles and either party may initiate the 285 exchange (and both parties may implement it simultaneously). 287 Prior to beginning the Dragonfly exchange, the two peers MUST derive 288 a secret element in the chosen domain parameter set. Two "hunting- 289 and-pecking" techniques to determine a secret element, one for ECC 290 and one for FFC, are described in Section 3.2 but any secure, 291 determinstic method that is agreed up on can be used. For instance, 292 the technique described in [hash2ec] can be used for ECC groups. 294 The Dragonfly exchange consists of two message exchanges, a "Commit 295 Exchange" in which both sides commit to a single guess of the 296 password, and a "Confirm Exchange" in which both sides confirm 297 knowledge of the password. A side effect of running the Dragonfly 298 exchange is an authenticated, shared, and secret key whose 299 cryptographic strength is set by the agreed-upon group. 301 Dragonfly uses a random function, H(), a mapping function, F(), and a 302 key derivation function, KDF(). 304 3.1. Assumptions 306 The Dragonfly protocol achieves security under some basic 307 assumptions: 309 1. Function H is a "random oracle" (see [RANDOR]) that maps a binary 310 string of indeterminate length onto a fixed binary string that is 311 x bits in length. 313 H: {0,1}^* --> {0,1}^x 315 Given knowledge of the input to H, an adversary is unable to 316 distinguish the output of H from a random data source. 318 2. Function F is a mapping function that takes an element in a group 319 and returns an integer. For ECC groups function F() returns the 320 x-coordinate of the element (which is a point on the elliptic 321 curve), for FFC groups function F() is the identity function 322 (since all elements in an FFC group are already integers less 323 than the prime): 325 ECC: x = F(P), where P=(x,y) 327 FFC: x = F(x) 329 3. Function KDF is a key derivation function (see, for instance, 330 [SP800-108]) that takes a key to stretch, k, a label to bind to 331 the key, label, and an indication of the desired output, n: 333 stretch = KDF-n(k, label) 335 so that len(stretch) equals n. 337 4. The discrete logarithm problem for the chosen group is hard. 338 That is, given G, P, and Y = G^x mod p, it is computationally 339 infeasible to determine x. Similarly, for an ECC group given the 340 curve definition, a generator G, and Y = x * G, it is 341 computationally infeasible to determine x. 343 5. There exists a pool of passwords from which the password shared 344 by the two peers is drawn. This pool can consist of words from a 345 dictionary, for example. Each password in this pool has an equal 346 probability of being the shared password. All potential 347 attackers have access to this pool of passwords. 349 6. The peers have to ability to produce quality random numbers. 351 3.2. Derivation of the Password Element 353 Prior to beginning the exchange of information, the peers MUST derive 354 a secret element, called the Password Element (PE), in the group 355 defined by the chosen domain parameter set. From the point-of-view 356 of an attacker who does not know the password, PE will be a random 357 element in the negotiated group. Two examples are described here for 358 completeness but any method of deterministically mapping a secret 359 string into an element in a selected group can be used, for instance 360 the technique in [hash2ec] for ECC groups. If a different technique 361 than the ones described here is used, the secret string SHOULD 362 include the identities of the peers. 364 To fix PE, both peers MUST have a common view of the password. If 365 there is any password processing necessary, for example to support 366 internationalization, the processed password is then used as the 367 shared credential. If either side wants to store a salted version of 368 the password it will be necessary to convey the salt to the other 369 side prior to commensing the exchange and the salted password is then 370 used as the shared credential. 372 Note: only one party would be able to maintain a salted password and 373 this would require that the Dragonfly key exchange be used in a 374 protocol that has strict roles for client (that always initiates) and 375 server (that always responds). Due to the symmetric nature of 376 Dragonfly salting passwords does not prevent an impersonation attack 377 after compromise of a database of salted passwords. 379 The determinstic process to select the PE begins with choosing a 380 secret seed and then performing a group-specific hunting-and-pecking 381 technique-- one for FFC groups and another for ECC groups. 383 To thwart side channel attacks which attempt to determine the number 384 of iterations of the "hunting-and-pecking" loop are used to find PE 385 for a given password, a security parameter, k, is used that ensures 386 that at least k iterations are always performed. The probability 387 that one requires more than "n" iterations of the "hunting-and- 388 pecking" loop to find an ECC PE is roughly (q/2p)^n and to find an 389 FFC PE is roughly (q/p)^n, both of which rapidly approach zero (0) as 390 "n" increases. The security parameter, k, SHOULD be set sufficiently 391 large such that the probability that finding PE would take more than 392 k iterations is sufficiently small (see Section 6). 394 First, an 8-bit counter is set to one (1) and a secret base is 395 computed using the negotiated one-way function with the identities of 396 the two participants, Alice and Bob, the secret password and the 397 counter: 399 base = H((max(Alice,Bob) | min(Alice,Bob) | password | counter) 401 The identities are passed to the max() and min() functions to provide 402 the necessary ordering of the inputs to H() while still allowing for 403 a peer-to-peer exchange where both Alice and Bob each view themselves 404 as the "initiator" of the exchange. 406 The base is then stretched using the technique from section B.5.1 of 407 [FIPS186-4]. The key derivation function, KDF, is used to produce a 408 bitstream whose length is equal to the length of the prime from the 409 group's domain parameter set plus the constant sixty-four (64) to 410 derive a temporary value, and the temporary value is moularly reduced 411 to produce a seed: 413 n = len(p) + 64 415 temp = KDF-n(base, "Dragonfly Hunting and Pecking") 417 seed = (temp mod (p - 1)) + 1 419 The string bound to the derived temporary value is for illustrative 420 purposes only. Implementations of the Dragonfly key exchange SHOULD 421 use a usage specific label with the KDF. 423 Note: the base is stretched to 64 more bits than are needed so that 424 the bias from the modular reduction is not so apparent. 426 The seed is then passed to the group-specific hunting and pecking 427 technique. 429 If the protocol performing the Dragonfly exchange has the ability to 430 exchange random nonces those SHOULD be added to the computation of 431 base to ensure that each run of the protocol produces a different PE. 433 3.2.1. Hunting and Pecking with ECC Groups 435 The ECC specific hunting and pecking technique entails looping until 436 a valid point on the elliptic curve has been found. The seed is used 437 as an x-coordinate with the equation of the curve to check whether 438 x^3 + a*x + b is a quadratic residue modulo p. If it is not, then 439 the counter is incremented, a new base and new seed are generated and 440 the hunting and pecking continues. If it is a quadratic residue 441 modulo p, then the x-coordinate is assigned the value of seed and the 442 current base is stored. When the hunting-and-pecking loop 443 terminates, the x-coordinate is used with the equation of the curve 444 to solve for a y-coordinate. An ambiguity exists since two values 445 for the y-coordinate would be valid and the low-order bit of the 446 stored base is used to unambiguously determine the correct 447 y-coordinate. The resulting (x,y) pair becomes the Password Element, 448 PE. 450 Algorithmically, the process looks like this: 452 found = 0 453 counter = 1 454 n = len(p) + 64 455 do { 456 base = H(max(Alice,Bob) | min(Alice,Bob) | password | counter) 457 temp = KDF-n(base, "Dragonfly Hunting And Pecking") 458 seed = (temp mod (p - 1)) + 1 459 if ( (seed^3 + a*seed + b) is a quadratic residue mod p) 460 then 461 if ( found == 0 ) 462 then 463 x = seed 464 save = base 465 found = 1 466 fi 467 fi 468 counter = counter + 1 469 } while ((found == 0) || (counter <= k)) 470 y = sqrt(x^3 + ax + b) 471 if ( lsb(y) == lsb(save) ) 472 then 473 PE = (x,y) 474 else 475 PE = (x,p-y) 476 fi 478 Figure 1: Fixing PE for ECC Groups 480 Checking whether a value is a quadradic residue modulo a prime can 481 leak information about that value in a side-channel attack. 482 Therefore, it is RECOMMENDED that the technique used to determine if 483 the value is a quadratic residue modulo p blind the value with a 484 random number so that the blinded value can take on all numbers 485 between 1 and p-1 with equal probability while not changing its 486 quadratic residuosity. Determining the quadratic residue in a 487 fashion that resists leakage of information is handled by flipping a 488 coin and multiplying the blinded value by either a random quadratic 489 residue or a random quadratic nonresidue and checking whether the 490 multiplied value is a quadradic residue or a quadradic nonresidue 491 modulo p, respectively. The random residue and nonresidue can be 492 calculated prior to hunting-and-pecking by calculating the legendre 493 symbol on random values until they are found: 495 do { 496 qr = random() mod p 497 } while ( lgr(qr, p) != 1) 499 do { 500 qnr = random() mod p 501 } while ( lgr(qnr, p) != -1) 503 Algorithmically, the masking technique to find out whether a value is 504 a quadratic residue or not looks like this: 506 is_quadratic_residue (val, p) { 507 r = (random() mod (p - 1)) + 1 508 num = (val * r * r) mod p 509 if ( lsb(r) == 1 ) 510 num = (num * qr) mod p 511 if ( lgr(num, p) == 1) 512 then 513 return TRUE 514 fi 515 else 516 num = (num * qnr) mod p 517 if ( lgr(num, p) == -1) 518 then 519 return TRUE 520 fi 521 fi 522 return FALSE 523 } 525 3.2.2. Hunting and Pecking with MODP Groups 527 The MODP specific hunting and pecking technique entails finding a 528 random element which, when used as a generator, will create a group 529 with the same order as the group created by the generator from the 530 domain parameter set. The secret generator is found by 531 exponentiating the seed to the value ((p-1)/q), where p is the prime 532 and q is the order from the domain parameter set. If that value is 533 greater than one (1) it becomes PE, otherwise the counter is 534 incremented, a new base and seed are generated, and the hunting and 535 pecking continues. 537 Algorithmically, the process looks like this: 539 found = 0 540 counter = 1 541 n = len(p) + 64 542 do { 543 base = H(max(Alice,Bob) | min(Alice,Bob) | password | counter) 544 temp = KDF-n(seed, "Dragonfly Hunting And Pecking") 545 seed = (temp mod (p - 1)) + 1 546 temp = seed ^ ((p-1)/q) mod p 547 if (temp > 1) 548 then 549 if (not found) 550 PE = temp 551 found = 1 552 fi 553 fi 554 counter = counter + 1 555 } while ((found == 0) || (counter <= k)) 557 Figure 2: Fixing PE for MODP Groups 559 3.3. The Commit Exchange 561 In the Commit Exchange both sides commit to a single guess of the 562 password. The peers generate a scalar and an element, exchange them 563 with each other, and process the other's scalar and element to 564 generate a common and shared secret. 566 First each peer generates two random numbers, private and mask. 567 These two secrets, the Password Element, and the order from the 568 selected domain parameter set are then used to construct the scalar 569 and element: 571 scalar = (private + mask) modulo q 573 Element = inverse(scalar-op(mask, PE)) 575 If the scalar is less than two (2), the private and mask MUST be 576 thrown away and new values generated. Once a valid scalar and 577 Element are generated, the mask is no longer needed and MUST be 578 irretrievably destroyed. 580 The peers exchange their scalar and Element and check the peer's 581 scalar and Element, deemed peer-scalar and Peer-Element. If the peer 582 has sent an identical scalar and Element-- i.e. if scalar equals 583 peer-scalar and Element equals Peer-Element-- it is sign of a 584 reflection attack and the exchange MUST be aborted. If the values 585 differ, peer-scalar and Peer-Element must be validated. For the 586 peer-scalar to be valid, it MUST be between 1 and q exclusive. 588 Validation of the Peer-Element depends on the type of cryptosystem-- 589 validation of an (x,y) pair as an ECC element is specified in 590 Section 2.1 and validation of a number as an FFC element is specified 591 in Section 2.2. If either the peer-scalar or Peer-Element fail 592 validation then the exchange MUST be terminated and authentication 593 fails. If both the peer-scalar and Peer-Element are valid, they are 594 used with the Password Element to derive a shared secret, ss: 596 ss = F(scalar-op(private, 597 element-op(peer-Element, 598 scalar-op(peer-scalar, PE)))) 600 To enforce key separation and crypto hygiene, the shared secret is 601 stretched into two subkeys, a key confirmation key, kck, and a master 602 key, mk. Each of the subkeys SHOULD be at least the length of the 603 prime used in the selected group. 605 kck | mk = KDF-n(ss, "Dragonfly Key Derivation") 607 where n = len(p)*2. 609 3.4. The Confirm Exchange 611 In the Confirm Exchange both sides confirm that they derived the same 612 secret, and therefore, are in possession of the same password. 614 The Commit Exchange consists of an exchange of data that is the 615 output of the random function, H(), the key confirmation key, and the 616 two scalars and two elements exchanged in the Commit Exchange. The 617 order of the scalars and elements are, scalars before elements, and 618 sender's value before recipient's value. So from each peer's 619 perspective, it would generate: 621 confirm = H(kck | scalar | peer-scalar | 622 Element | Peer-Element | ) 624 Where is the identity of the sender of the confirm 625 message. This identity SHALL be that contributed by the sender of 626 the confim message in generation of the base in Section 3.2. 628 The two peers exchange these confirmations and verify the correctness 629 of the other peer's confirmation that they receive. If the other 630 peer's confirmation is valid, authentication succeeds; if the other 631 peer's confirmation is not valid, authentication fails. 633 If authentication fails, all ephemeral state created as part of the 634 particular run of the Dragonfly exchange MUST be irretrievabley 635 destroyed. If authentication does not fail, mk can be exported as an 636 authenticated and secret key that can be used by another protocol, 637 for instance IPsec, to protect other data. 639 4. Acknowledgements 641 The author would like to thank Kevin Igoe and David McGrew, chairmen 642 of the Crypto Forum Research Group (CFRG) for agreeing to accept this 643 memo as a CFRG work item. Additional thanks go to Scott Fluhrer and 644 Hideyuki Suzuki for discovering attacks against earlier versions of 645 this key exchange and suggesting fixes to address them. Lily Chen 646 provided helpful discussions on hashing into an elliptic curve. Rich 647 Davis suggested the validation steps used on received elements to 648 prevent a small sub-group attack. Dylan Clarke and Feng Hao 649 discovered a dictionary attack against Dragonfly if those checks are 650 not made and a group with a small sub-group is used. 652 The blinding scheme to prevent side-channel attacks when determining 653 whether a value is a quadratic residue modulo a prime was suggested 654 by Scott Fluhrer. Kevin Igoe suggested addition of the security 655 parameter k to hide the amount of time taken hunting-and-pecking for 656 the password element. 658 5. IANA Considerations 660 This memo includes no request to IANA. 662 6. Security Considerations 664 The Dragonfly exchange requires both participants to have an 665 identical representation of the password. Salting of the password 666 merely generates a new credential-- the salted password-- which must 667 be identically represented on both sides. If an adversary is able to 668 gain access to the database of salted passwords, she would be able to 669 impersonate one side to the other, even if she was unable to 670 determine the underlying, unsalted, password. 672 Resistance to dictionary attack means that an adversary must launch 673 an active attack to make a single guess at the password. If the size 674 of the dictionary from which the password was extracted was "d", and 675 each password in the dictionary has an equal probability of being 676 chosen, then the probability of success after a single guess is 1/d. 677 After "x" guesses, and removal of failed guesses from the pool of 678 possible passwords, the probability becomes 1/(d-x). As "x" grows, 679 so does the probability of success. Therefore, it is possible for an 680 adversary to determine the password through repeated brute-force, 681 active, guessing attacks. Users of the Dragonfly key exchange SHOULD 682 ensure that the size of the pool from which the password was drawn, 683 "d", is sufficiently large to make this attack preventable. 685 Implementations of Dragonfly SHOULD support countermeasures to deal 686 with this attack-- for instance, by refusing authentication attempts 687 for a certain amount of time, after the number of failed 688 authentication attempts reaches a certain threshold. No such 689 threshold or amount of time is recommended in this memo. 691 Due to the problems with using groups that contain a small sub-group, 692 it is RECOMMENDED that implementations of Dragonfly not allow for the 693 specification of a group's domain parameter set in-line but instead 694 use a common repository in which to pass an identifier to a domain 695 parameter set whose strength has been rigourously proven and that 696 does not have small sub-groups. If a group's domain parameter set is 697 passed in-line, it SHOULD NOT be used with Dragonfly unless it 698 directly matches a known good group. 700 It is RECOMMENDED that an implementation set the security parameter, 701 k, to a value of at least forty (40) which will put the probability 702 that more than forty iterations are needed in the order of one in one 703 trillion (1:1,000,000,000,000). 705 7. References 707 7.1. Normative References 709 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 710 Requirement Levels", BCP 14, RFC 2119, March 1997. 712 7.2. Informative References 714 [FIPS186-4] 715 National Institute of Standards and Technology, "Digital 716 Signature Standard (DSS)", Federal Information Processing 717 Standards Publication 186-4, 718 . 721 [RANDOR] Bellare, M. and P. Rogaway, "Random Oracles are Practical: 722 A Paradigm for Designing Efficient Protocols", Proceedings 723 of the 1st ACM Conference on Computer and Communication 724 Security, ACM Press, 1993, 725 . 727 [RFC5433] Clancy, T. and H. Tschofenig, "Extensible Authentication 728 Protocol - Generalized Pre-Shared Key (EAP-GPSK) Method", 729 RFC 5433, February 2009. 731 [RFC5996] Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, 732 "Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 733 5996, September 2010. 735 [RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic 736 Curve Cryptography Algorithms", RFC 6090, February 2011. 738 [SP800-108] 739 Chen, L., "Recommendations for Key Derivation Using 740 Pseudorandom Functions", NIST Special Publication 800-108, 741 April 2008. 743 [SP800-56A] 744 Barker, E., Johnson, D., and M. Smid, "Recommendations for 745 Pair-Wise Key Establishment Schemes Using Discrete 746 Logarithm Cryptography", NIST Special Publication 800-56A, 747 March 2007. 749 [hash2ec] Coron, J-B. and T. Icart, "An indifferentiable hash 750 function into elliptic curves", Cryptology ePrint Archive 751 Report 2009/340, 2009. 753 Author's Address 755 Dan Harkins (editor) 756 Aruba Networks 757 1322 Crossman Avenue 758 Sunnyvale, CA 94089-1113 759 United States of America 761 Email: dharkins@arubanetworks.com