]> Cypherpunks repositories - gostls13.git/commit
[dev.boringcrypto] crypto/rsa: fix boring GenerateKey to set non-nil Precomputed...
authorRuss Cox <rsc@golang.org>
Thu, 14 Sep 2017 03:07:38 +0000 (23:07 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 18 Sep 2017 00:31:43 +0000 (00:31 +0000)
commita929f3a04dc677703b46c8a908b86432b6b9b52b
treeab2f7e1352e16e590ba028a8f08d3f5667a429f7
parentaa4a4a80ff4f91d58b9a9e645f1367098183856a
[dev.boringcrypto] crypto/rsa: fix boring GenerateKey to set non-nil Precomputed.CRTValues

This matches the standard GenerateKey and more importantly Precompute,
so that if you generate a key and then store it, read it back, call Precompute
on the new copy, and then do reflect.DeepEqual on the two copies, they
will match. Before this CL, the original key had CRTValues == nil and the
reconstituted key has CRTValues != nil (but len(CRTValues) == 0).

Change-Id: I1ddc64342a50a1b65a48d827e4d564f1faab1945
Reviewed-on: https://go-review.googlesource.com/63914
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/rsa/boring_test.go
src/crypto/rsa/rsa.go