- changed status to resolved
Investigate RSAPrivateKey.getEncoded() determinism
See JUnit test RSAKeyTest.testKeyConversionRoundTrip()
assertEquals("Private RSA", Base64.encode(rsaPrivateKeyIn.getEncoded()).toString(), Base64.encode(rsaPrivateKeyOut.getEncoded()).toString());
Comments (4)
-
reporter -
reporter Fix issue
#75: Loss of CRT params on RSA keysThis fixes issue
#75, which was caused by the fact that a call to privateKey on RSAKey.Builder would not always use the CRT representation of the private key. This change checks if a key is encoded using CRT, and subsequently calls the proper function. Otherwise, the additional parameters for the CRT encoding would get lost and the resulting PKCS8 encoding of the private keys would not match.→ <<cset ba1efd1fc96b>>
-
reporter Merged in csstaub/nimbus-jose-jwt/issue75-fix (pull request #7)
Fix issue
#75: Loss of CRT params on RSA keys→ <<cset cb59cdae30c9>>
-
reporter RSA KeyPairGenerator returns instance of RSAPrivateCrtKey with CRT parameters, which are included in the (DER?) encoded form.
Test passes after changes in commit ba1efd1fc96b8bcf8ec607cb20f40f09a35267fd.
- Log in to comment
Fix issue
#75: Loss of CRT params on RSA keysThis fixes issue
#75, which was caused by the fact that a call to privateKey on RSAKey.Builder would not always use the CRT representation of the private key. This change checks if a key is encoded using CRT, and subsequently calls the proper function. Otherwise, the additional parameters for the CRT encoding would get lost and the resulting PKCS8 encoding of the private keys would not match.→ <<cset ba1efd1fc96b>>