Package 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().
- Since:
- 0.9.31
-
Field Summary
-
Method Summary
Modifier and Type Method 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
-
Method Details
-
fromJavaKey
public static RSASigningPrivateCrtKey fromJavaKey(RSAPrivateCrtKey pk) throws GeneralSecurityException- Throws:
IllegalArgumentException
- if data is not correct lengthGeneralSecurityException
-
toJavaKey
-