ProtonMail / go-crypto

Fork of go/x/crypto, providing an up-to-date OpenPGP implementation
https://pkg.go.dev/github.com/ProtonMail/go-crypto
BSD 3-Clause "New" or "Revised" License
328 stars 99 forks source link

Generated keys may be unsuitable for encryption #184

Open dalai4git opened 11 months ago

dalai4git commented 11 months ago

In openpgp/key_generation.go the rsa.GenerateKey function from the standard library is used. As far as I can tell, the new key may have primes such that p > q, which is not according to RFC 4880 and can lead to occasional problems when decrypting using gpg.

See also: https://dev.gnupg.org/T4579