net.i2p.crypto

## Class RSASigningPrivateCrtKey

- java.lang.Object
- - net.i2p.data.SimpleDataStructure
  - - net.i2p.data.SigningPrivateKey
    - - net.i2p.crypto.RSASigningPrivateCrtKey

- All Implemented Interfaces:
    Destroyable, DataStructure

      final class RSASigningPrivateCrtKey
      extends 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 Summary

    - ### Fields inherited from class net.i2p.data.SigningPrivateKey

      `KEYSIZE_BYTES`

    - ### Fields inherited from class net.i2p.data.SimpleDataStructure

      `_data`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RSASigningPrivateCrtKey` | `fromJavaKey(RSAPrivateCrtKey pk)`
    `RSAPrivateCrtKey` | `toJavaKey()`

    - ### Methods inherited from class net.i2p.data.SigningPrivateKey

      `blind, destroy, equals, getType, hashCode, isDestroyed, isOffline, length, toPublic, toString`

    - ### Methods inherited from class net.i2p.data.SimpleDataStructure

      `calculateHash, fromBase64, fromByteArray, getData, read, readBytes, setData, toBase64, toByteArray, writeBytes`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### fromJavaKey

          public static RSASigningPrivateCrtKey fromJavaKey(RSAPrivateCrtKey pk)
                                                     throws GeneralSecurityException

      Throws:
        `IllegalArgumentException` - if data is not correct length
        `GeneralSecurityException`

    - #### toJavaKey

          public RSAPrivateCrtKey toJavaKey()