]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: fix blinding when using a null random source.
authorAdam Langley <agl@golang.org>
Wed, 4 Nov 2009 01:23:50 +0000 (17:23 -0800)
committerAdam Langley <agl@golang.org>
Wed, 4 Nov 2009 01:23:50 +0000 (17:23 -0800)
commitbcce2987e0ea9ba25d102f3565eac04e84307181
tree00df06080e32076b3583c450a32dce232c8afd65
parentb5ab5d4f12754cc0b86a2bf5efc7974039f39a26
crypto/rsa: fix blinding when using a null random source.

For testing it can be useful to use a null random source (one which
always returns zero) to remove non-determinism from the tests.
However, when performing RSA blinding, the random blind ends up being
zero and it's hard to reverse a multiplication by zero.

R=rsc
CC=go-dev
http://go/go-review/1018033
src/pkg/crypto/rsa/rsa.go