These coefficients go in the other order

This commit is contained in:
Stephen Paul Weber 2016-07-26 20:09:15 -05:00
parent 4531815ef2
commit 741fec24a6

View File

@ -11,8 +11,8 @@ $nkey = new OpenPGP_SecretKeyPacket(array(
'n' => $rsa->modulus->toBytes(),
'e' => $rsa->publicExponent->toBytes(),
'd' => $rsa->exponent->toBytes(),
'p' => $rsa->primes[1]->toBytes(),
'q' => $rsa->primes[2]->toBytes(),
'p' => $rsa->primes[2]->toBytes(),
'q' => $rsa->primes[1]->toBytes(),
'u' => $rsa->coefficients[2]->toBytes()
));