Recent from talks
Nothing was collected or created yet.
EdDSA
View on Wikipedia| General | |
|---|---|
| Designers | Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, Bo-Yin Yang, et al. |
| First published | 26 September 2011 |
| Detail | |
| Structure | Elliptic-curve cryptography |
In public-key cryptography, Edwards-curve Digital Signature Algorithm (EdDSA) is a digital signature scheme using a variant of Schnorr signature based on twisted Edwards curves.[1] It is designed to be faster than existing digital signature schemes without sacrificing security. It was developed by a team including Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, and Bo-Yin Yang.[2] The reference implementation is public-domain software.[3]
Summary
[edit]The following is a simplified description of EdDSA, ignoring details of encoding integers and curve points as bit strings; the full details are in the papers and RFC.[4][2][1]
An EdDSA signature scheme is a choice:[4]: 1–2 [2]: 5–6 [1]: 5–7
- of finite field over odd prime power ;
- of elliptic curve over whose group of -rational points has order , where is a large prime and is called the cofactor;
- of base point with order ; and
- of cryptographic hash function with -bit outputs, where so that elements of and curve points in can be represented by strings of bits.
These parameters are common to all users of the EdDSA signature scheme. The security of the EdDSA signature scheme depends critically on the choices of parameters, except for the arbitrary choice of base point—for example, Pollard's rho algorithm for logarithms is expected to take approximately curve additions before it can compute a discrete logarithm,[5] so must be large enough for this to be infeasible, and is typically taken to exceed 2200.[6] The choice of is limited by the choice of , since by Hasse's theorem, cannot differ from by more than . The hash function is normally modelled as a random oracle in formal analyses of EdDSA's security.
Within an EdDSA signature scheme,
- Public key
- An EdDSA public key is a curve point , encoded in bits.
- Signature verification
- An EdDSA signature on a message by public key is the pair , encoded in bits, of a curve point and an integer satisfying the following verification equation, where denotes concatenation:
- Private key
- An EdDSA private key is a -bit string which should be chosen uniformly at random. The corresponding public key is , where is the least significant bits of interpreted as an integer in little-endian.
- Signing
- The signature on a message is deterministically computed as where for , and This satisfies the verification equation
Ed25519
[edit]Ed25519 is the EdDSA signature scheme using SHA-512 (SHA-2) and an elliptic curve related to Curve25519[2] where
- is the twisted Edwards curve
- and
- is the unique point in whose coordinate is and whose coordinate is positive.
"positive" is defined in terms of bit-encoding:- "positive" coordinates are even coordinates (least significant bit is cleared)
- "negative" coordinates are odd coordinates (least significant bit is set)
- is SHA-512, with .
The twisted Edwards curve is known as edwards25519,[7][1] and is birationally equivalent to the Montgomery curve known as Curve25519. The equivalence is[2][7][8]
Performance
[edit]The original team has optimized Ed25519 for the x86-64 Nehalem/Westmere processor family. Verification can be performed in batches of 64 signatures for even greater throughput. Ed25519 is intended to provide attack resistance comparable to quality 128-bit symmetric ciphers.[9]
Public keys are 256 bits long and signatures are 512 bits long.[10]
Secure coding
[edit]Ed25519 is designed to avoid implementations that use branch conditions or array indices that depend on secret data,[2]: 2 [1]: 40 in order to mitigate side-channel attacks.
As with other discrete-log-based signature schemes, EdDSA uses a secret value called a nonce unique to each signature. In the signature schemes DSA and ECDSA, this nonce is traditionally generated randomly for each signature—and if the random number generator is ever broken and predictable when making a signature, the signature can leak the private key, as happened with the Sony PlayStation 3 firmware update signing key.[11][12][13][14]
In contrast, EdDSA chooses the nonce deterministically as the hash of a part of the private key and the message. Thus, once a private key is generated, EdDSA has no further need for a random number generator in order to make signatures, and there is no danger that a broken random number generator used to make a signature will reveal the private key.[2]: 8
Standardization and implementation inconsistencies
[edit]Note that there are two standardization efforts for EdDSA, one from IETF, an informational RFC 8032 and one from NIST as part of FIPS 186-5.[15] The differences between the standards have been analyzed,[16][17] and test vectors are available.[18]
Software
[edit]Notable uses of Ed25519 include OpenSSH,[19] GnuPG[20] and various alternatives, and the signify tool by OpenBSD.[21] Usage of Ed25519 (and Ed448) in the SSH protocol has been standardized.[22] In 2023 the final version of the FIPS 186-5 standard included deterministic Ed25519 as an approved signature scheme.[15]
- Apple Watch and iPhone use Ed25519 keys for IKEv2 mutual authentication[23]
- Botan
- Crypto++
- CryptoNote cryptocurrency protocol
- Dropbear SSH[24]
- I2Pd implementation of EdDSA[25]
- Java Development Kit 15
- Libgcrypt
- Minisign[26] and Minisign Miscellanea[27] for macOS
- NaCl / libsodium[28]
- OpenSSL 1.1.1[29]
- Python - A slow but concise alternate implementation,[30] does not include side-channel attack protection[31]
- Supercop reference implementation[32] (C language with inline assembler)
- Virgil PKI uses Ed25519 keys by default[33]
- wolfSSL[34]
Ed448
[edit]Ed448 is the EdDSA signature scheme defined in RFC 8032 using the hash function SHAKE256 and the elliptic curve edwards448, an (untwisted) Edwards curve related to Curve448 in RFC 7748. Ed448 has also been approved in the final version of the FIPS 186-5 standard.[15]
References
[edit]- ^ a b c d e Josefsson, S.; Liusvaara, I. (January 2017). Edwards-Curve Digital Signature Algorithm (EdDSA). IRTF. doi:10.17487/RFC8032. ISSN 2070-1721. RFC 8032. Retrieved 2022-07-11.
- ^ a b c d e f g Bernstein, Daniel J.; Duif, Niels; Lange, Tanja; Schwabe, Peter; Bo-Yin Yang (2012). "High-speed high-security signatures" (PDF). Journal of Cryptographic Engineering. 2 (2): 77–89. doi:10.1007/s13389-012-0027-1. S2CID 945254.
- ^ "Software". 2015-06-11. Retrieved 2016-10-07.
The Ed25519 software is in the public domain.
- ^ a b Daniel J. Bernstein; Simon Josefsson; Tanja Lange; Peter Schwabe; Bo-Yin Yang (2015-07-04). EdDSA for more curves (PDF) (Technical report). Retrieved 2016-11-14.
- ^ Daniel J. Bernstein; Tanja Lange; Peter Schwabe (2011-01-01). On the correct use of the negation map in the Pollard rho method (Technical report). IACR Cryptology ePrint Archive. 2011/003. Retrieved 2016-11-14.
- ^ Bernstein, Daniel J.; Lange, Tanja. "ECDLP Security: Rho". SafeCurves: choosing safe curves for elliptic-curve cryptography. Retrieved 2016-11-16.
- ^ a b Langley, A.; Hamburg, M.; Turner, S. (January 2016). Elliptic Curves for Security. IETF. doi:10.17487/RFC7748. ISSN 2070-1721. RFC 7748. Retrieved 2024-11-12.
- ^ Bernstein, Daniel J.; Lange, Tanja (2007). Kurosawa, Kaoru (ed.). Faster addition and doubling on elliptic curves. Advances in cryptology—ASIACRYPT. Lecture Notes in Computer Science. Vol. 4833. Berlin: Springer. pp. 29–50. doi:10.1007/978-3-540-76900-2_3. ISBN 978-3-540-76899-9. MR 2565722.
- ^ Bernstein, Daniel J. (2017-01-22). "Ed25519: high-speed high-security signatures". Retrieved 2019-09-27.
This system has a 2^128 security target; breaking it has similar difficulty to breaking NIST P-256, RSA with ~3000-bit keys, strong 128-bit block ciphers, etc.
- ^ Bernstein, Daniel J. (2017-01-22). "Ed25519: high-speed high-security signatures". Retrieved 2020-06-01.
Signatures fit into 64 bytes. […] Public keys consume only 32 bytes.
- ^ Johnston, Casey (2010-12-30). "PS3 hacked through poor cryptography implementation". Ars Technica. Retrieved 2016-11-15.
- ^ fail0verflow (2010-12-29). Console Hacking 2010: PS3 Epic Fail (PDF). Chaos Communication Congress. Archived from the original (PDF) on 2018-10-26. Retrieved 2016-11-15.
- ^ "27th Chaos Communication Congress: Console Hacking 2010: PS3 Epic Fail" (PDF). Retrieved 2019-08-04.
- ^ Buchanan, Bill (2018-11-12). "Not Playing Randomly: The Sony PS3 and Bitcoin Crypto Hacks. Watch those random number generators". Medium. Archived from the original on 2018-11-30. Retrieved 2024-03-11.
- ^ a b c Moody, Dustin (2023-02-03). FIPS 186-5: Digital Signature Standard (DSS). NIST. doi:10.6028/NIST.FIPS.186-5. S2CID 256480883. Retrieved 2023-03-04.
- ^ Chalkias, Konstantinos; Garillot, Francois; Nikolaenko, Valeria (2020-10-01). Taming the many EdDSAs. Security Standardisation Research Conference (SSR 2020). Retrieved 2021-02-15.
- ^ Brendel, Jacqueline; Cremers, Cas; Jackson, Dennis; Zhao, Mang (2020-07-03). The provable security of ed25519: Theory and practice. IEEE Symposium on Security and Privacy (S&P 2021). Retrieved 2021-02-15.
- ^ "ed25519-speccheck". GitHub. Retrieved 2021-02-15.
- ^ "Changes since OpenSSH 6.4". 2014-01-03. Retrieved 2016-10-07.
- ^ "What's new in GnuPG 2.1". 2016-07-14. Retrieved 2016-10-07.
- ^ "Things that use Ed25519". 2016-10-06. Retrieved 2016-10-07.
- ^ Harris, B.; Velvindron, L. (February 2020). Ed25519 and Ed448 Public Key Algorithms for the Secure Shell (SSH) Protocol. IETF. doi:10.17487/RFC8709. ISSN 2070-1721. RFC 8709. Retrieved 2022-07-11.
- ^ "System security for watchOS". Retrieved 2021-06-07.
- ^ Matt Johnston (2013-11-14). "DROPBEAR_2013.61test". Archived from the original on 2019-08-05. Retrieved 2019-08-05.
- ^ "Heuristic Algorithms and Distributed Computing" (PDF). Èvrističeskie Algoritmy I Raspredelennye Vyčisleniâ (in Russian): 55–56. 2015. ISSN 2311-8563. Archived from the original (PDF) on 2016-10-20. Retrieved 2016-10-07.
- ^ Frank Denis. "Minisign: A dead simple tool to sign files and verify signatures". Retrieved 2016-10-07.
- ^ minisign-misc on GitHub
- ^ Frank Denis (2016-06-29). "libsodium/ChangeLog". GitHub. Retrieved 2016-10-07.
- ^ "OpenSSL CHANGES". July 31, 2019. Archived from the original on May 18, 2018. Retrieved August 5, 2019.
- ^ "python/ed25519.py: the main subroutines". 2011-07-06. Retrieved 2016-10-07.
- ^ "Software: Alternate implementations". 2015-06-11. Retrieved 2016-10-07.
- ^ "eBACS: ECRYPT Benchmarking of Cryptographic Systems: SUPERCOP". 2016-09-10. Retrieved 2016-10-07.
- ^ "Virgil Security Crypto Library for C: Library: Foundation". GitHub. Retrieved 2019-08-04.
- ^ "wolfSSL Embedded SSL Library (formerly CyaSSL)". Retrieved 2016-10-07.
External links
[edit]EdDSA
View on GrokipediaIntroduction
Definition and Purpose
EdDSA, or the Edwards-curve Digital Signature Algorithm, is a digital signature scheme that leverages elliptic curves in Edwards form to produce signatures based on a variant of Schnorr signatures. It operates over a twisted Edwards curve defined on a finite field , utilizing a hash function , a base point on the curve, and a private key to generate public keys and signatures in the form of pairs .[2][1] The primary purpose of EdDSA is to deliver fast and secure digital signatures for public-key cryptography applications, addressing key vulnerabilities in earlier schemes like DSA and ECDSA. Unlike ECDSA, which relies on random nonces that can lead to security breaches if poorly generated—as seen in the Sony PlayStation 3 incident—EdDSA employs deterministic nonce generation via , where is a hashed representation of the private key and is the message, ensuring reproducibility without introducing randomness flaws. This design targets high-speed verification, with implementations achieving up to 71,000 verifications per second on standard hardware, while providing equivalent security levels around bits against existential forgery under chosen-message attacks.[2][1] Furthermore, EdDSA emphasizes resistance to side-channel attacks, such as timing, cache, and branch-prediction exploits, by avoiding secret-dependent operations like conditional branches or array indexing based on private data; all computations use uniform-time algorithms on twisted Edwards curves. Compared to ECDSA, EdDSA offers significantly faster performance in signing and verification speeds— with signing up to over 20 times faster and batch verification up to over 15 times faster in benchmarks from the original paper—while maintaining comparable security margins, making it suitable for resource-constrained environments like embedded systems and high-throughput protocols. Detailed security comparisons are explored in subsequent analyses.[2][1]Historical Development
EdDSA, or Edwards-curve Digital Signature Algorithm, was developed by Daniel J. Bernstein, Niels Duif, Tanja Lange, Peter Schwabe, and Bo-Yin Yang as a high-speed, high-security digital signature scheme based on elliptic curve cryptography.[2] The scheme was first specified in their paper "High-speed high-security signatures," initially released as a preprint on September 26, 2011.[5] This work introduced EdDSA as an instantiation of the Schnorr signature adapted for twisted Edwards curves, emphasizing deterministic nonce generation to mitigate risks associated with random number generation failures.[2] The primary motivations for EdDSA stemmed from observed vulnerabilities in existing elliptic curve signature schemes like ECDSA, particularly the catastrophic consequences of nonce reuse, as exemplified by the 2010 Sony PlayStation 3 incident where poor randomness in ECDSA nonces led to private key recovery.[2] Developers sought a more robust alternative that avoided such pitfalls through fully deterministic signing processes while leveraging the complete Edwards addition law on twisted Edwards curves for faster, more constant-time arithmetic operations, enabling efficient implementations without compromising security.[2] These design choices addressed both practical performance needs and the demand for verifiable security in resource-constrained environments. Key milestones in EdDSA's evolution include its formal specification in the 2011 paper, followed by standardization efforts that culminated in RFC 8032, published in January 2017 by the Internet Engineering Task Force, which detailed EdDSA for curves Ed25519 and Ed448 with precise encoding and decoding rules. Separately, in 2015, Mike Hamburg proposed Ed448 as another instantiation of EdDSA, which was included alongside Ed25519 in the RFC 8032 standardization.[6][3] Further adoption came with its approval in NIST's Federal Information Processing Standard (FIPS) 186-5, released on February 3, 2023, incorporating EdDSA as an approved technique for digital signatures alongside additional requirements for federal use.[7] As of late 2025, no major updates have extended EdDSA into quantum-resistant contexts, as it remains based on elliptic curves vulnerable to quantum attacks. EdDSA's development was closely tied to the SafeCurves project, led by Bernstein and Lange, which guided the selection of secure elliptic curves by evaluating criteria such as resistance to side-channel attacks, fast ladder implementations, and complete addition formulas—properties exemplified by the Curve25519 birationally equivalent to Ed25519.[8] This collaboration ensured that EdDSA's underlying curves met rigorous security standards beyond mere discrete logarithm hardness, promoting safe deployment in cryptographic protocols.[8]Mathematical Foundations
Edwards Curves
Edwards curves are elliptic curves presented in a form that simplifies the group law, making them particularly suitable for cryptographic protocols. The curve is defined by the equation over the finite field , where is an odd prime and is a nonzero scalar ensuring the curve is nonsingular (specifically, in the generalized presentation, but here with the coefficient of as ). This equation represents a birationally equivalent transformation of traditional Weierstrass-form elliptic curves , allowing the same underlying group structure while offering computational benefits.[9][10] A key property of Edwards curves is the complete addition law, which can be implemented in projective coordinates (where and ) without exceptional cases or branchings for distinct points, inverses, or the identity. This unified approach avoids the need for separate handling of point doublings, mixed additions, or identity elements, reducing implementation complexity and potential errors. The curves also exhibit symmetry in and , facilitating efficient parameterization and arithmetic. These features stem from the geometric interpretation of the curve as a normalized form that aligns addition with simple rational functions.[10] The group law is explicitly given by formulas for point addition and doubling in projective coordinates. For two points and , the sum uses intermediate computations such as , , , , , , , yielding , , (adapted for the coefficient on ). A simplified view of the dehomogenized form gives the affine addition formulas , , illustrating the compact rational structure without requiring field inversions during projective computation. Doubling formulas follow similarly, with costs around 3M + 4S (multiplications and squarings) for efficiency. These inversion-free operations enable fast ladder implementations.[10][11] In cryptographic contexts, Edwards curves excel due to their support for constant-time, side-channel-resistant arithmetic, essential for secure signature schemes. The unified formulas ensure uniform execution paths, mitigating timing and simple power analysis attacks, while the overall speed surpasses many Weierstrass-based alternatives—additions cost approximately 10M + 1S in general projective coordinates. This makes them ideal for high-performance applications like digital signatures, where repeated group operations must balance security and efficiency. The form admits extensions to twisted variants for optimized parameter selection over various fields.[10]Twisted Edwards Curves
Twisted Edwards curves generalize the Edwards curve form to , where and are distinct nonzero scalars in the base field (with characteristic not 2), allowing unlike the standard Edwards curves where .[12] This generalization covers a broader class of elliptic curves while preserving desirable geometric properties, such as the curve being nonsingular as long as .[12] A key advantage of twisted Edwards curves is their support for complete and unified addition laws, which apply uniformly to all pairs of points without exceptional cases, provided is a square and a nonsquare in the field; this ensures resistance to certain side-channel attacks and simplifies implementation in cryptographic protocols.[12] Additionally, they enable highly efficient ladder algorithms for scalar multiplication, achieving costs as low as 10 multiplications plus one squaring and two doublings in projective coordinates, or 9 multiplications plus one squaring and two doublings in inverted coordinates, making them suitable for high-speed elliptic curve cryptography.[12] To further optimize arithmetic, twisted Edwards curves often employ extended projective coordinates , where , , and the relation holds, allowing the storage of the product alongside the other coordinates.[10] This representation doubles computational speed for addition and doubling operations by enabling parallelizable formulas: unified addition requires only 9M + 2D (or 8M + 1D when ), while dedicated doubling uses 4M + 4S + 1D, with mixed additions at 8M + 1D; such efficiencies can improve scalar multiplication by 4% to 18% compared to prior methods and support simple power analysis protections.[10] Twisted Edwards curves are birationally equivalent to Montgomery curves via explicit maps, and in fact isogenous to them, permitting x-coordinate-only arithmetic for applications like key exchange while retaining full (x, y)-coordinate operations essential for digital signatures that require y-coordinate verification.[12] This duality expands the range of secure curves available for cryptography, as every twisted Edwards curve corresponds to a Montgomery form, facilitating interoperability between different elliptic curve representations.[12]Parameter Selection
Parameter selection for EdDSA involves choosing elliptic curve parameters that balance security, efficiency, and resistance to known attacks, primarily for twisted Edwards curves of the form over a finite field . The field is defined by a prime such that the curve order , ensuring the group is large enough for cryptographic security; specifically, the order factors as , where is a large prime (providing approximately -bit security against the Pollard rho attack) and the cofactor is small with to facilitate efficient cofactor multiplication during signing while avoiding excessive vulnerability to small-subgroup attacks.[13][14][8] Curve constants and are selected to optimize arithmetic speed and security: is commonly chosen when for faster computations via the negation map, while must be a non-square (not a quadratic residue) modulo to ensure the curve equation defines a secure group structure without exceptional cases in the addition law; additionally, parameters should be chosen in a rigid, verifiable manner to ensure transparency and prevent potential backdoors, as recommended by criteria such as those outlined on SafeCurves. The base point is an arbitrary generator of the large-order subgroup, typically chosen to have a small x-coordinate for encoding efficiency, but verified to lie in the correct subgroup (order ); cofactor cleavage techniques, such as multiplying by during key generation, ensure operations stay within the secure subgroup. The hash function outputs bits, where , using a conservative cryptographic hash like SHA-512 to derive nonces and compress messages securely.[12][13][8][14] Security goals guide these choices to mitigate specific threats: the embedding degree must satisfy (typically for 128-bit security) to resist MOV and Smart attacks, which exploit Weil/Tate pairings to reduce the elliptic curve discrete logarithm problem to a finite field discrete logarithm; this is verified computationally for candidate curves. The curve must have a complete torsion subgroup over , meaning all points of order dividing are defined without anomalies, to prevent invalid curve attacks. Small subgroup attacks are avoided by the small cofactor and by ensuring the hash function and scalar encoding clamp to multiples of , confining operations to the prime-order subgroup. These criteria, drawn from rigorous analysis, prioritize curves with fast, complete addition formulas while excluding those vulnerable to pairing-based or exceptional-case exploits.[14][8][13]Algorithm Specification
Key Generation
In EdDSA, key generation begins with the selection of a private key seed, which is a uniformly random b-bit string , where b is the specified bit length for the curve (256 for Ed25519, 456 for Ed448). This string serves as a seed for the deterministic derivation of the signing scalar.[1] The scalar is then computed from using the curve's hash function with clamping to ensure it lies in the appropriate range modulo . For Ed25519, is the clamped little-endian integer from the first 32 bytes of SHA-512(); for Ed448, from the first 57 bytes of SHAKE256(, 114). Clamping for Ed25519 clears the lowest three bits and sets the second-most significant bit; for Ed448, it clears the lowest two bits and sets a specific high bit. The scalar is then reduced modulo . This deterministic process enhances security by avoiding direct use of raw randomness in scalar multiplication.[1][15] The public key is derived by performing scalar multiplication: , where is the fixed base point of the curve. The point is encoded into a b-bit string, typically in little-endian format consisting of the y-coordinate (b-1 bits) followed by a sign bit for the x-coordinate. This encoding facilitates compact representation and efficient verification.[1] The full key generation process follows these steps:- Generate a uniform random b-bit string as the private key seed.
- Compute the clamped hash-based scalar from as described.
- Perform the scalar multiplication to obtain the public key point and encode it accordingly.
