Ed25519 'double public key' oracle: ~45 libraries let callers leak the private key
Kostas Chalkias (MystenLabs) catalogued about 45 Ed25519 libraries whose sign() API takes the public key as a separate argument without checking it matches the private key. Since the deterministic nonce R depends only on the secret and the message, an attacker who can request signatures of the same message under two different claimed public keys gets two signatures with the same R and different challenges, and solves for the secret scalar.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
EdDSA removed ECDSA's RNG risk but added an API-misuse risk: implementations caching or accepting an untrusted public key turn the signer into a key-recovery oracle. Exploitation needs an unusual architecture (for example a signing service that takes public keys from callers), so impact is limited, but affected libraries included ed25519-dalek's older API, GNU Nettle and ed25519-donna. About 8 had fixed it by May 2023. IMPLEMENTATION / API design, not a weakness in Ed25519.
Sources
- codeMystenLabs/ed25519-unsafe-libs (list of affected libraries)GitHub, github.com