opencard.opt.security
Class RSAPublicKey
java.lang.Object
|
+--opencard.opt.security.RSAPublicKey
- public class RSAPublicKey
- extends java.lang.Object
- implements java.security.PublicKey
Contains a public RSA key.
implements the java.security.PrivateKey interface
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: RSAPublicKey.java,v 1.1.1.1 1999/10/05 15:08:48 damke Exp $
- See Also:
PrivateKey, Serialized Form
|
Field Summary |
protected java.math.BigInteger |
e
Public exponent |
protected int |
el
Length of public 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 |
RSAPublicKey(java.math.BigInteger e,
java.math.BigInteger m)
Produce an RSAPublicKey from the given BigIntegers. |
RSAPublicKey(int eLength,
byte[] e,
byte[] m,
int keyLength)
Produce an RSAPublicKey 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 |
maxInputLength()
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 |
publicExponent()
Return Public exponent. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
el
protected int el
- Length of public exponent
e
protected java.math.BigInteger e
- Public exponent
m
protected java.math.BigInteger m
- Modulus
inputLength
protected int inputLength
- input data length
outputLength
protected int outputLength
- output data length
keyLength
protected int keyLength
- Key length (in bits)
RSAPublicKey
public RSAPublicKey(int eLength,
byte[] e,
byte[] m,
int keyLength)
- Produce an RSAPublicKey from the given byte arrays.
- Parameters:
eLength - Length of public exponent.e - Public Exponent.m - ModuluskeyLength - The nominal size of the key in bits.
RSAPublicKey
public RSAPublicKey(java.math.BigInteger e,
java.math.BigInteger m)
- Produce an RSAPublicKey from the given BigIntegers.
- Parameters:
e - Public Exponent.m - Modulus.
getAlgorithm
public java.lang.String getAlgorithm()
- Conformance to the java.security interface
- See Also:
PublicKey
getEncoded
public byte[] getEncoded()
- Conformance to the java.security interface
- See Also:
PublicKey
getFormat
public java.lang.String getFormat()
- Conformance to the java.security interface
- See Also:
PublicKey
maxInputLength
public int maxInputLength()
- 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
publicExponent
public java.math.BigInteger publicExponent()
- Return Public exponent.
- Returns:
- Public exponent of this key
|