]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: don't correct private exponent unless needed.
authorAdam Langley <agl@golang.org>
Mon, 25 Mar 2013 23:08:29 +0000 (19:08 -0400)
committerAdam Langley <agl@golang.org>
Mon, 25 Mar 2013 23:08:29 +0000 (19:08 -0400)
commitf20f8b8b0a4236c7438c830261a5860cbd9efe80
tree915f937080bed51a617b22ad009bb81e70636c01
parent5a529b61aa2174b4c44809a02c9735e0c725f2f3
crypto/rsa: don't correct private exponent unless needed.

At some point in the past, I believe the GCD algorithm was setting d to
be negative. The RSA code has been correcting that ever since but, now,
it appears to have changed and the correction isn't needed.

Having d be too large is harmless, it's just a little odd and I
happened to notice.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7948044
src/pkg/crypto/rsa/rsa.go
src/pkg/crypto/rsa/rsa_test.go