• Adam Langley's avatar
    crypto/rsa: only enforce that de ≡ 1 mod |(ℤ/nℤ)*| in order to load private... · 22690e66
    Adam Langley authored
    crypto/rsa: only enforce that de ≡ 1 mod |(ℤ/nℤ)*| in order to load private keys generated by GnuTLS.
    
    Previously we checked that de ≡ 1 mod φ(n). Since φ(n) is a multiple
    of |(ℤ/nℤ)*|, this encompassed the new check, but it was too strict as
    keys generated by GnuTLS would be rejected when gcd(p-1,q-1)≠1.
    
    (Also updated the error strings in crypto/rsa to contain the package name, which some were missing.)
    
    R=golang-dev, r
    CC=golang-dev
    https://golang.org/cl/5867043
    22690e66
rsa_test.go 15.7 KB