|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopencard.opt.security.RSAPrivateKey
public class RSAPrivateKey
Contains an RSA private key. Implements interface java.security.PrivateKey. For an alternative class that allows signing via the chinese remainder's algorithm see RSACRTKey. In this package OpenCard provides key classes for common algorithms like RSA, DSA (or DES) that each concrete card service implementing a card service interface should support instead of defining its own key classes. Only for new PKA algorithms that OpenCard does not yet support a card service may define its own key classes.
PrivateKey
,
RSACRTKey
,
Serialized FormField Summary | |
---|---|
protected java.math.BigInteger |
e_
Exponent |
protected int |
inputLength_
input data length |
protected int |
keyLength_
Key length (in bits) |
protected java.math.BigInteger |
m_
Modulus |
protected int |
outputLength_
output data length |
Fields inherited from interface java.security.PrivateKey |
---|
serialVersionUID |
Constructor Summary | |
---|---|
RSAPrivateKey(java.math.BigInteger e,
java.math.BigInteger m)
Produce an RSAPrivateKey from the given byte arrays. |
|
RSAPrivateKey(byte[] m,
byte[] e,
int inputLength,
int outputLength,
int keyLength)
Produce an RSAPrivateKey from the given byte arrays. |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
Conformance to the java.security interface |
byte[] |
getEncoded()
Conformance to the java.security interface |
java.lang.String |
getFormat()
Conformance to the java.security interface |
int |
getInputLength()
Returns the number of bytes to be input into a signing operation with this key. |
int |
maxOutputLength()
Returns the number of bytes to be generated by a signing operation with this key. |
java.math.BigInteger |
modulus()
Return modulus of this key. |
java.math.BigInteger |
privateExponent()
Return Private exponent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.math.BigInteger m_
protected java.math.BigInteger e_
protected int inputLength_
protected int outputLength_
protected int keyLength_
Constructor Detail |
---|
public RSAPrivateKey(byte[] m, byte[] e, int inputLength, int outputLength, int keyLength)
m
- Moduluse
- private exponentinputLength
- Number of bytes accepted for input to signature routine.outputLength
- Number of bytes produced by signature routine.keyLength
- The nominal size of the key in bits.public RSAPrivateKey(java.math.BigInteger e, java.math.BigInteger m)
m
- Moduluse
- private exponentMethod Detail |
---|
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
PrivateKey
public byte[] getEncoded()
getEncoded
in interface java.security.Key
PrivateKey
public java.lang.String getFormat()
getFormat
in interface java.security.Key
PrivateKey
public int getInputLength()
public int maxOutputLength()
public java.math.BigInteger modulus()
public java.math.BigInteger privateExponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |