RadarFound by Attacks on Public-Key Cryptography· 8 follow

SM2 seeded key generation always produces private key 1

Nov 24 find · published Nov 20
GIgithub.com · 2 min readRead original
SM2 weak RNGPredictable private key generationKnown private key vulnerability

sm-crypto-v2 versions 1.2.2–2.0.1 compute seeded SM2 private keys using mod(BigInt(seed), 1) + 1, which always equals 1 regardless of input. Every application using the seeded generateKeyPairHex API generates the same publicly known private key and public key (the standard SM2 generator point G). Attackers can forge signatures and decrypt ciphertext for any such key. Version 2.0.2 fixes the seed reduction to mod(BigInt(seed), curve.n - 1) + 1. Unseeded key generation is unaffected.

1.2.2–2.0.1Affected versions
2.0.2Patched version

Comments

Sign in to join the conversation.

More from this batch

GPU-accelerated Stern ISD recovers McEliece keys in 18.9 minuteseprint.iacr.orgFalcon-rust sampler truncates precision below specificationcvereports.comML-KEM library skips FIPS 203 input validation checksrustsec.orgJWT library RSA1_5 padding oracle leaks content encryption keyseuvd.enisa.europa.euCode-based NGCC candidates have decoding costs below security targetseprint.iacr.org
Attacks on Public-Key CryptographyNew attacks on public-key cryptography as they appear: cryptanalysis of RSA, elliptic curves and lattices (ML-KEM, ML-DSA, Falcon), breaks of post-quantum candidates, side-channel and fault attacks that recover keys, implementation flaws, and new quantum resource estimates. Papers first, with the numbers that matter.