de.flexiprovider.core.mprsa
Class MpRSAPrivateKey
java.lang.Object
|
+--de.flexiprovider.api.keys.PrivateKey
|
+--de.flexiprovider.core.rsa.interfaces.RSAPrivateKey
|
+--de.flexiprovider.core.rsa.interfaces.RSAPrivateCrtKey
|
+--de.flexiprovider.core.rsa.RSAPrivateCrtKey
|
+--de.flexiprovider.core.mprsa.MpRSAPrivateKey
- All Implemented Interfaces:
- Key, java.security.Key, java.security.PrivateKey, RSAKey, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateCrtKey, java.security.interfaces.RSAPrivateKey, java.io.Serializable
- public class MpRSAPrivateKey
- extends RSAPrivateCrtKey
This class implements a multi-prime RSA private key.
- Author:
- Paul Nguentcheu
- See Also:
- Serialized Form
| Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.security.interfaces.RSAPrivateKey |
getPrivateExponent |
| Methods inherited from interface java.security.Key |
getAlgorithm, getEncoded, getFormat |
| Methods inherited from interface java.security.interfaces.RSAKey |
getModulus |
MpRSAPrivateKey
public MpRSAPrivateKey(FlexiBigInt n,
FlexiBigInt e,
FlexiBigInt d,
FlexiBigInt p,
FlexiBigInt q,
FlexiBigInt dP,
FlexiBigInt dQ,
FlexiBigInt crtCoeff,
RSAOtherPrimeInfo[] otherPrimeInfo)
- Generates a new MpRSA private key.
- Parameters:
n - the number n = p*q;e - the public exponent e.d - the private exponent d.p - the prime p.q - the prime q.dP - the number d mod (p-1).dQ - the number d mod (q-1).crtCoeff - the coefficient for RSA decryption with the CRT.otherPrimeInfo - the additional primes.- See Also:
MpRSAKeyPairGenerator
MpRSAPrivateKey
protected MpRSAPrivateKey(MpRSAPrivateKeySpec keySpec)
- Construct an MpRSAPrivateKey out of the given key specification.
- Parameters:
keySpec - the key specification
getOtherPrimeInfo
public RSAOtherPrimeInfo[] getOtherPrimeInfo()
- Returns:
- the additional primes
equals
public boolean equals(java.lang.Object other)
- Compare this key with another object.
- Overrides:
equals in class RSAPrivateCrtKey
- Parameters:
other - the other object- Returns:
- the result of the comparison
toString
public java.lang.String toString()
- Overrides:
toString in class RSAPrivateCrtKey
- Returns:
- a human readable form of the key
hashCode
public int hashCode()
- Overrides:
hashCode in class RSAPrivateCrtKey
getOID
protected codec.asn1.ASN1ObjectIdentifier getOID()
- Overrides:
getOID in class RSAPrivateCrtKey
- Returns:
- the OID to encode in the SubjectPublicKeyInfo structure
getAlgParams
protected codec.asn1.ASN1Type getAlgParams()
- Overrides:
getAlgParams in class RSAPrivateCrtKey
- Returns:
- the algorithm parameters to encode in the SubjectPublicKeyInfo
structure
getKeyData
protected byte[] getKeyData()
- Overrides:
getKeyData in class RSAPrivateCrtKey
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure