In
public-key cryptography
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
, Edwards-curve Digital Signature Algorithm (EdDSA) is a
digital signature scheme using a variant of
Schnorr signature based on
twisted Edwards curves.
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.
The
reference implementation
In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation ...
is
public-domain software.
Summary
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.
An EdDSA signature scheme is a choice:
* of
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
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
A cryptographic hash function (CHF) is a hash algorithm (a map (mathematics), map of an arbitrary binary string to a binary string with a fixed size of n bits) that has special properties desirable for a cryptography, cryptographic application: ...
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, so
must be large enough for this to be infeasible, and is typically taken to exceed .
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
In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalizations of concatenati ...
:
; 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
Ed25519 is the EdDSA signature scheme using
SHA-512
SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001. They are built using the Merkle–Damgård construction, from a one-way compression ...
(SHA-2) and an elliptic curve related to
Curve25519 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
SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001. They are built using the Merkle–Damgård construction, from a one-way compression ...
, with
.
The
twisted Edwards curve is known as edwards25519,
and is
birationally equivalent to the
Montgomery curve known as
Curve25519.
The equivalence is
Performance
The original team has optimized Ed25519 for the
x86-64
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
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.
Public keys are 256 bits long and signatures are 512 bits long.
Secure coding
Ed25519 is designed to avoid implementations that use branch conditions or array indices that depend on secret data,
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.
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.
Standardization and implementation inconsistencies
Note that there are two standardization efforts for EdDSA, one from IETF, an informational and one from NIST as part of FIPS 186-5.
The differences between the standards have been analyzed, and test vectors are available.
Software
Notable uses of Ed25519 include
OpenSSH,
GnuPG and various alternatives, and the
signify tool by
OpenBSD
OpenBSD is a security-focused operating system, security-focused, free software, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by fork (software development), forking NetBSD ...
. Usage of Ed25519 (and Ed448) in the SSH protocol has been standardized. In 2023 the final version of the
FIPS 186-5 standard included deterministic Ed25519 as an approved signature scheme.
*
Apple Watch
The Apple Watch is a brand of smartwatch products developed and marketed by Apple Inc., Apple. It incorporates activity tracker, fitness tracking, Health (Apple), health-oriented capabilities, and wireless telecommunication, and integrates wit ...
and
iPhone
The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
use Ed25519 keys for
IKEv2 mutual authentication
*
Botan
*
Crypto++
*
CryptoNote cryptocurrency
A cryptocurrency (colloquially crypto) is a digital currency designed to work through a computer network that is not reliant on any central authority, such as a government or bank, to uphold or maintain it.
Individual coin ownership record ...
protocol
*
Dropbear SSH
* I2Pd implementation of EdDSA
*
Java Development Kit
The Java Development Kit (JDK) is a distribution of Java technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java ...
15
*
Libgcrypt
* Minisign and Minisign Miscellanea for
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
*
NaCl / libsodium
*
OpenSSL 1.1.1
*
Python - A slow but concise alternate implementation, does not include
side-channel attack protection
* Supercop reference implementation (
C language with inline
assembler)
* Virgil PKI uses Ed25519 keys by default
*
wolfSSL
Ed448
Ed448 is the EdDSA signature scheme defined in using the hash function
SHAKE256 and the elliptic curve edwards448, an (untwisted)
Edwards curve related to
Curve448 in .
Ed448 has also been approved in the final version of the FIPS 186-5 standard.
References
External links
Ed25519 home page
{{Cryptography public-key
Public-key cryptography
Elliptic curve cryptography
Digital signature schemes
Public-domain software with source code