Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Elliptic-curve Diffie–Hellman

From Wikipedia, the free encyclopedia
(Redirected fromECDH)
Key agreement protocol

Elliptic-curve Diffie–Hellman (ECDH) is akey agreement protocol that allows two parties, each having anelliptic-curve public–private key pair, to establish ashared secret over aninsecure channel.[1][2][3] This shared secret may be directly used as a key, or toderive another key. The key, or the derived key, can then be used to encrypt subsequent communications using asymmetric-key cipher. It is a variant of theDiffie–Hellman protocol usingelliptic-curve cryptography.

Key establishment protocol

[edit]

The following example illustrates how a shared key is established. SupposeAlice wants to establish a shared key withBob, but the only channel available for them may be eavesdropped by a third party. Initially, thedomain parameters (that is,(p,a,b,G,n,h){\displaystyle (p,a,b,G,n,h)} in the prime case or(m,f(x),a,b,G,n,h){\displaystyle (m,f(x),a,b,G,n,h)} in the binary case) must be agreed upon. Also, each party must have a key pair suitable for elliptic curve cryptography, consisting of a private keyd{\displaystyle d} (a randomly selected integer in the interval[1,n1]{\displaystyle [1,n-1]}) and a public key represented by a pointQ{\displaystyle Q} (whereQ=dG{\displaystyle Q=d\cdot G}, that is, the result ofaddingG{\displaystyle G} to itselfd{\displaystyle d} times). Let Alice's key pair be(dA,QA){\displaystyle (d_{\text{A}},Q_{\text{A}})} and Bob's key pair be(dB,QB){\displaystyle (d_{\text{B}},Q_{\text{B}})}. Each party must know the other party's public key prior to execution of the protocol.

Alice computes point(xk,yk)=dAQB{\displaystyle (x_{k},y_{k})=d_{\text{A}}\cdot Q_{\text{B}}}. Bob computes point(xk,yk)=dBQA{\displaystyle (x_{k},y_{k})=d_{\text{B}}\cdot Q_{\text{A}}}. The shared secret isxk{\displaystyle x_{k}} (thex coordinate of the point). Most standardized protocols based on ECDH derive a symmetric key fromxk{\displaystyle x_{k}} using some hash-based key derivation function.

The shared secret calculated by both parties is equal, becausedAQB=dAdBG=dBdAG=dBQA{\displaystyle d_{\text{A}}\cdot Q_{\text{B}}=d_{\text{A}}\cdot d_{\text{B}}\cdot G=d_{\text{B}}\cdot d_{\text{A}}\cdot G=d_{\text{B}}\cdot Q_{\text{A}}}.

The only information about her key that Alice initially exposes is her public key. So, no party except Alice can determine Alice's private key (Alice of course knows it by having selected it), unless that party can solve the elliptic curvediscrete logarithm problem. Bob's private key is similarly secure. No party other than Alice or Bob can compute the shared secret, unless that party can solve the elliptic curveDiffie–Hellman problem.

The public keys are either static (and trusted, say via a certificate) or ephemeral (also known asECDHE, where final 'E' stands for "ephemeral").Ephemeral keys are temporary and not necessarily authenticated, so if authentication is desired, authenticity assurances must be obtained by other means. Authentication is necessary to avoidman-in-the-middle attacks. If one of either Alice's or Bob's public keys is static, then man-in-the-middle attacks are thwarted. Static public keys provide neitherforward secrecy nor key-compromise impersonation resilience, among other advanced security properties. Holders of static private keys should validate the other public key, and should apply a securekey derivation function to the raw Diffie–Hellman shared secret to avoid leaking information about the static private key. For schemes with other security properties, seeMQV.

If Alice maliciously chooses invalid curve points for her key and Bob does not validate that Alice's points are part of the selected group, she can collect enough residues of Bob's key to derive his private key. SeveralTLS libraries were found to be vulnerable to this attack.[4]

The shared secret is uniformly distributed on a subset of[0,p){\displaystyle [0,p)} of size(n+1)/2{\displaystyle (n+1)/2}. For this reason, the secret should not be used directly as a symmetric key, but it can be used as entropy for a key derivation function.

Diffie-Hellman Key Agreement on Montgomery Curves

[edit]

LetA,BFp{\displaystyle A,B\in F_{p}} such thatB(A24)0{\displaystyle B(A^{2}-4)\neq 0}. The Montgomery form elliptic curveEM,A,B{\displaystyle E_{M,A,B}} is the set of all(x,y)Fp×Fp{\displaystyle (x,y)\in F_{p}\times F_{p}} satisfying the equationBy2=x(x2+Ax+1){\displaystyle By^{2}=x(x^{2}+Ax+1)} along with the point at infinity denoted as{\displaystyle \infty }. This is called the affine form of the curve. The set of allFp{\displaystyle F_{p}}-rational points ofEM,A,B{\displaystyle E_{M,A,B}}, denoted asEM,A,B(Fp){\displaystyle E_{M,A,B}(F_{p})} is the set of all(x,y)Fp×Fp{\displaystyle (x,y)\in F_{p}\times F_{p}} satisfyingBy2=x(x2+Ax+1){\displaystyle By^{2}=x(x^{2}+Ax+1)} along with{\displaystyle \infty }. Under a suitably defined addition operation,EM,A,B(Fp){\displaystyle E_{M,A,B}(F_{p})} is a group with{\displaystyle \infty } as the identity element. It is known that the order of this group is a multiple of 4. In fact, it is usually possible to obtainA{\displaystyle A} andB{\displaystyle B} such that the order ofEM,A,B{\displaystyle E_{M,A,B}} is4q{\displaystyle 4q} for a primeq{\displaystyle q}. For more extensive discussions of Montgomery curves and their arithmetic one may follow.[5][6][7]

For computational efficiency, it is preferable to work with projective coordinates. The projective form of the Montgomery curveEM,A,B{\displaystyle E_{M,A,B}} isBY2Z=X(X2+AXZ+Z2){\displaystyle BY^{2}Z=X(X^{2}+AXZ+Z^{2})}. For a pointP=[X:Y:Z]{\displaystyle P=[X:Y:Z]} onEM,A,B{\displaystyle E_{M,A,B}}, thex{\displaystyle x}-coordinate mapx{\displaystyle x} is the following:[7]x(P)=[X:Z]{\displaystyle x(P)=[X:Z]} ifZ0{\displaystyle Z\neq 0} andx(P)=[1:0]{\displaystyle x(P)=[1:0]} ifP=[0:1:0]{\displaystyle P=[0:1:0]} .Bernstein[8][9] introduced the mapx0{\displaystyle x_{0}} as follows:x0(X:Z)=XZp2{\displaystyle x_{0}(X:Z)=XZ^{p-2}} which is defined for all values ofX{\displaystyle X} andZ{\displaystyle Z} inFp{\displaystyle F_{p}}. Following Miller,[10] Montgomery[5] and Bernstein,[9] the Diffie-Hellman key agreement can be carried out on a Montgomery curve as follows. LetQ{\displaystyle Q} be a generator of a prime order subgroup ofEM,A,B(Fp){\displaystyle E_{M,A,B}(F_{p})}. Alice chooses a secret keys{\displaystyle s} and has public keyx0(sQ){\displaystyle x_{0}(sQ)}; Bob chooses a secret keyt{\displaystyle t} and has public keyx0(tQ){\displaystyle x_{0}(tQ)}. The shared secret key of Alice and Bob isx0(stQ){\displaystyle x_{0}(stQ)}. Using classical computers, the best known method of obtainingx0(stQ){\displaystyle x_{0}(stQ)} fromQ,x0(sQ){\displaystyle Q,x_{0}(sQ)} andx0(tQ){\displaystyle x_{0}(tQ)} requires aboutO(p1/2){\displaystyle O(p^{1/2})} time using thePollards rho algorithm.[11]

The most famous example of Montgomery curve isCurve25519 which was introduced by Bernstein.[9] For Curve25519,p=225519,A=486662{\displaystyle p=2^{255}-19,A=486662} andB=1{\displaystyle B=1}.The other Montgomery curve which is part of TLS 1.3 isCurve448 which was introducedby Hamburg.[12] For Curve448,p=244822241,A=156326{\displaystyle p=2^{448}-2^{224}-1,A=156326} andB=1{\displaystyle B=1}. Couple of Montgomery curves named M[4698] and M[4058] competitive toCurve25519 andCurve448 respectively have been proposed in.[13] For M[4698],p=22519,A=4698,B=1{\displaystyle p=2^{251}-9,A=4698,B=1} and for M[4058],p=244417,A=4058,B=1{\displaystyle p=2^{444}-17,A=4058,B=1}. At 256-bit security level, three Montgomery curves named M[996558], M[952902] and M[1504058] have been proposed in.[14] For M[996558],p=250645,A=996558,B=1{\displaystyle p=2^{506}-45,A=996558,B=1}, for M[952902],p=251075,A=952902,B=1{\displaystyle p=2^{510}-75,A=952902,B=1} and for M[1504058],p=25211,A=1504058,B=1{\displaystyle p=2^{521}-1,A=1504058,B=1} respectively. Apart from these two, other proposals of Montgomery curves can be found at.[15]

Software

[edit]

See also

[edit]

References

[edit]
  1. ^NIST,Special Publication 800-56A, Recommendation for Pair-Wise Key Establishment Schemes Using Discrete Logarithm Cryptography, March, 2006.
  2. ^Certicom Research,Standards for efficient cryptography, SEC 1: Elliptic Curve Cryptography, Version 2.0, May 21, 2009.
  3. ^NSA Suite B Cryptography,Suite B Implementers' Guide to NIST SP 800-56AArchived 2016-03-06 at theWayback Machine, July 28, 2009.
  4. ^Tibor Jager; Jorg Schwenk; Juraj Somorovsky (2015-09-04)."Practical Invalid Curve Attacks on TLS-ECDH"(PDF).European Symposium on Research in Computer Security (ESORICS'15).
  5. ^abMontgomery, Peter L."Speeding the Pollard and elliptic curve methods of factorization"(PDF). Mathematics of Computation, 48(177):243–264, 1987.
  6. ^Bernstein, Daniel J.; Lange, Tanja (2017)."Montgomery curves and the Montgomery ladder". In Joppe W. Bos and Arjen K. Lenstra, editors, Topics in Computational Number Theory inspired by Peter L. Montgomery, pages 82–115. Cambridge University Press, 2017.
  7. ^abCostello, Craig; Smith, Benjamin (September 2018)."Montgomery curves and their arithmetic - the case of large characteristic fields".Journal of Cryptographic Engineering.8 (3). J. Cryptographic Engineering, 8(3):227–240, 2018.:227–240.arXiv:1703.01863.doi:10.1007/s13389-017-0157-6.
  8. ^Bernstein, Daniel J."Can we avoid tests for zero in fast elliptic-curve arithmetic?"(PDF).
  9. ^abcBernstein, Daniel J. (2006)."Curve25519: New Diffie-Hellman Speed Records".Public Key Cryptography - PKC 2006. Lecture Notes in Computer Science. Vol. 3958. In: Yung, M., Dodis, Y., Kiayias, A., Malkin, T. (eds) Public Key Cryptography - PKC 2006. Lecture Notes in Computer Science, vol 3958. Springer, Berlin, Heidelberg. pp. 207–228.doi:10.1007/11745853_14.ISBN 978-3-540-33851-2.
  10. ^Miller, Victor S. (1986)."Use of elliptic curves in cryptography".Advances in Cryptology — CRYPTO '85 Proceedings. Lecture Notes in Computer Science. Vol. 218. In Advances in Cryptology - CRYPTO’85, Santa Barbara, California, USA, August 18-22, 1985, Proceedings, pages 417–426. Springer Berlin Heidelberg, 1985. pp. 417–426.doi:10.1007/3-540-39799-X_31.ISBN 978-3-540-16463-0.
  11. ^Pollard, John M."Monte Carlo methods for index computation mod p"(PDF). Mathematics of Computation, 32:918–924, 1978.
  12. ^Hamburg, Mike (2015)."Ed448-goldilocks, a new elliptic curve". ACR Cryptology ePrint Archive, 2015:625, 2015.
  13. ^Nath, Kaushik; Sarkar, Palash (2022)."Security and Efficiency Trade-offs for Elliptic Curve Diffie-Hellman at the 128- and 224-bit Security Levels".Journal of Cryptographic Engineering.12. J Cryptogr Eng 12, 107–121 (2022):107–121.doi:10.1007/s13389-021-00261-y., Code available athttps://github.com/kn-cs/x25519
  14. ^Nath, Kaushik; Sarkar, Palash (2020)."Efficient Elliptic Curve Diffie-Hellman Computation at the 256-bit Security Level".IET Information Security.14 (6):633–640.doi:10.1049/iet-ifs.2019.0620., Code available athttps://github.com/kn-cs/mont256-dh andhttps://github.com/kn-cs/mont256-vec
  15. ^Bernstein, Daniel J.; Lange, Tanja."Safecurves: choosing safe curves for elliptic- curve cryptography". RetrievedApril 15, 2024.
  16. ^JI (13 October 2015)."New generation of safe messaging: "Letter Sealing"".LINE Engineers' Blog. LINE Corporation. Archived fromthe original on 1 February 2019. Retrieved5 February 2018.
Algorithms
Integer factorization
Discrete logarithm
Lattice/SVP/CVP/LWE/SIS
Others
Theory
Standardization
Topics
General
Mathematics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Elliptic-curve_Diffie–Hellman&oldid=1325276929"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp