• Adam Langley's avatar
    crypto/ecdsa: reject negative inputs. · b30fcbc9
    Adam Langley authored
    The fact that crypto/ecdsa.Verify didn't reject negative inputs was a
    mistake on my part: I had unsigned numbers on the brain. However, it
    doesn't generally cause problems. (ModInverse results in zero, which
    results in x being zero, which is rejected.)
    
    The amd64 P-256 code will crash when given a large, negative input.
    
    This fixes both crypto/ecdsa to reject these values and also the P-256
    code to ignore the sign of inputs.
    
    Change-Id: I6370ed7ca8125e53225866f55b616a4022b818f8
    Reviewed-on: https://go-review.googlesource.com/22093
    Run-TryBot: Adam Langley <agl@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    b30fcbc9
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...