crypto/rsa: support > 3 primes.
With full multi-prime support we can support version 1 PKCS#1 private keys. This means exporting all the members of rsa.PrivateKey, thus making the API a little messy. However there has already been another request to export this so it seems to be something that's needed. Over time, rsa.GenerateMultiPrimeKey will replace rsa.GenerateKey, but I need to work on the prime balance first because we're no longer generating primes which are a multiples of 8 bits. Fixes #987. R=rsc CC=golang-dev https://golang.org/cl/4378046
This commit is contained in:
parent
5a11e9ba00
commit
de4a706aa9
@ -188,8 +188,10 @@ var testPrivateKey = &rsa.PrivateKey{
|
|||||||
E: 65537,
|
E: 65537,
|
||||||
},
|
},
|
||||||
D: bigFromString("29354450337804273969007277378287027274721892607543397931919078829901848876371746653677097639302788129485893852488285045793268732234230875671682624082413996177431586734171663258657462237320300610850244186316880055243099640544518318093544057213190320837094958164973959123058337475052510833916491060913053867729"),
|
D: bigFromString("29354450337804273969007277378287027274721892607543397931919078829901848876371746653677097639302788129485893852488285045793268732234230875671682624082413996177431586734171663258657462237320300610850244186316880055243099640544518318093544057213190320837094958164973959123058337475052510833916491060913053867729"),
|
||||||
P: bigFromString("11969277782311800166562047708379380720136961987713178380670422671426759650127150688426177829077494755200794297055316163155755835813760102405344560929062149"),
|
Primes: []*big.Int{
|
||||||
Q: bigFromString("10998999429884441391899182616418192492905073053684657075974935218461686523870125521822756579792315215543092255516093840728890783887287417039645833477273829"),
|
bigFromString("11969277782311800166562047708379380720136961987713178380670422671426759650127150688426177829077494755200794297055316163155755835813760102405344560929062149"),
|
||||||
|
bigFromString("10998999429884441391899182616418192492905073053684657075974935218461686523870125521822756579792315215543092255516093840728890783887287417039645833477273829"),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Script of interaction with gnutls implementation.
|
// Script of interaction with gnutls implementation.
|
||||||
|
Loading…
Reference in New Issue
Block a user