opencard.opt.security
Class RSAPrivateKey
java.lang.Object
|
+--opencard.opt.security.RSAPrivateKey
- public class RSAPrivateKey
- extends java.lang.Object
- implements java.security.PrivateKey
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.
- Version:
- $Id: RSAPrivateKey.java,v 1.2 1999/10/20 13:15:00 damke Exp $
- See Also:
PrivateKey,
RSACRTKey, Serialized Form
|
Field 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 |
|
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 |
m_
protected java.math.BigInteger m_
- Modulus
e_
protected java.math.BigInteger e_
- Exponent
inputLength_
protected int inputLength_
- input data length
outputLength_
protected int outputLength_
- output data length
keyLength_
protected int keyLength_
- Key length (in bits)
RSAPrivateKey
public RSAPrivateKey(byte[] m,
byte[] e,
int inputLength,
int outputLength,
int keyLength)
- Produce an RSAPrivateKey from the given byte arrays.
- Parameters:
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.
RSAPrivateKey
public RSAPrivateKey(java.math.BigInteger e,
java.math.BigInteger m)
- Produce an RSAPrivateKey from the given byte arrays.
- Parameters:
m - Moduluse - private exponent
getAlgorithm
public java.lang.String getAlgorithm()
- Conformance to the java.security interface
- See Also:
PrivateKey
getEncoded
public byte[] getEncoded()
- Conformance to the java.security interface
- See Also:
PrivateKey
getFormat
public java.lang.String getFormat()
- Conformance to the java.security interface
- See Also:
PrivateKey
getInputLength
public int getInputLength()
- Returns the number of bytes to be input into a signing operation
with this key.
- Returns:
- Input data length.
maxOutputLength
public int maxOutputLength()
- Returns the number of bytes to be generated by a signing operation
with this key.
- Returns:
- Output data length.
modulus
public java.math.BigInteger modulus()
- Return modulus of this key.
- Returns:
- Modulus of this key
privateExponent
public java.math.BigInteger privateExponent()
- Return Private exponent.
- Returns:
- Private exponent of this key
|