All Implemented Interfaces:
Destroyable, DataStructure

final class RSASigningPrivateCrtKeyextends SigningPrivateKey
A SigningPrivateKey that retains the Chinese Remainder Theorem parameters, so it can be converted back to a Java CRT key.

By preserving the CRT parameters across a Java to I2P to Java conversion, we speed up signing by about 3.3x, and the parameters are correctly serialized in PEM format when stored to a keystore.

The CRT parameters are NOT retained when this object is serialized via getData().

  • Field Details

    • _crt

      private final RSAPrivateCrtKey _crt
      The Java CRT key the signature is made with.
  • Constructor Details

    • RSASigningPrivateCrtKey

      private RSASigningPrivateCrtKey(RSAPrivateCrtKey pk, SigType type, byte[] data)
      Wraps a Java CRT key together with its encoded form.
      Parameters:
      pk - the Java private key
      type - the signature type
      data - the encoded key
  • Method Details