PuTTY P-521 ECDSA nonces had 9 zero bits: key recovery from ~60 signatures (CVE-2024-31497)
Fabian Bäumer and Marcus Brinkmann (Ruhr University Bochum) found that PuTTY 0.68-0.80 generated P-521 ECDSA nonces whose top 9 bits were always zero. PuTTY's deterministic scheme took a 512-bit SHA-512 output and reduced it modulo the 521-bit group order, which does nothing, so the high bits stayed zero. About 60 signatures, harvestable by a malicious SSH server or from signed Git commits, are enough for lattice key recovery.
Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.
Background
FileZilla, WinSCP, TortoiseGit and TortoiseSVN bundled the vulnerable code. Fixed in PuTTY 0.81. Any P-521 key used with affected versions should be considered compromised, since old signatures can be collected after the fact. Other curves had negligible bias. This is a pure IMPLEMENTATION bug in nonce derivation that turned a 256-bit-security curve into a broken key.
Sources
- cveoss-security: CVE-2024-31497: Secret Key Recovery of NIST P-521 Private Keys Through Biased ECDSA Nonces in PuTTY ClientOpenwall, openwall.com
- announcementPuTTY vulnerability vuln-p521-biasPuTTY (Simon Tatham), chiark.greenend.org.uk
- newsPuTTY SSH client flaw allows recovery of cryptographic private keysBleepingComputer, bleepingcomputer.com