|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopencard.opt.security.RSACRTKey
public class RSACRTKey
Contains an RSA key in a form suitable for fast signing via the chinese remainder's algorithm
. 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,
Serialized Form| Field Summary | |
|---|---|
protected java.math.BigInteger |
dp
d mod (p-1) |
protected java.math.BigInteger |
dq
d mod (q-1) |
protected int |
inputLength
input data length |
protected int |
keyLength
Key length (in bits) |
protected int |
outputLength
output data length |
protected java.math.BigInteger |
p
Prime p |
protected java.math.BigInteger |
q
Prime q |
protected java.math.BigInteger |
qm
(inverse of q) mod p |
| Fields inherited from interface java.security.PrivateKey |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
RSACRTKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger qm,
java.math.BigInteger dp,
java.math.BigInteger dq)
Produce an RSACRTKey from the given BigIntegers. |
|
RSACRTKey(byte[] p,
byte[] q,
byte[] qm,
byte[] dp,
byte[] dq,
int inputLength,
int outputLength,
int keyLength)
Produce an RSACRTKey from the given byte arrays. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
coefficient()
Coefficient of CRT representation. |
java.math.BigInteger |
exponent1()
First Exponent of CRT representation. |
java.math.BigInteger |
exponent2()
Second Exponent of CRT representation. |
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 |
prime1()
First Prime of CRT representation. |
java.math.BigInteger |
prime2()
Second Prime of CRT representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.math.BigInteger p
protected java.math.BigInteger q
protected java.math.BigInteger qm
protected java.math.BigInteger dp
protected java.math.BigInteger dq
protected int inputLength
protected int outputLength
protected int keyLength
| Constructor Detail |
|---|
public RSACRTKey(byte[] p,
byte[] q,
byte[] qm,
byte[] dp,
byte[] dq,
int inputLength,
int outputLength,
int keyLength)
p - Prime p.q - Prime q.qm - (inverse of q) mod pdp - d mod (p-1)dq - d mod (q-1)inputLength - 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 RSACRTKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger qm,
java.math.BigInteger dp,
java.math.BigInteger dq)
p - Prime p.q - Prime q.qm - (inverse of q) mod pdp - d mod (p-1)dq - d mod (q-1)| Method Detail |
|---|
public java.math.BigInteger coefficient()
public java.math.BigInteger exponent1()
public java.math.BigInteger exponent2()
public java.lang.String getAlgorithm()
getAlgorithm in interface java.security.KeyPrivateKeypublic byte[] getEncoded()
getEncoded in interface java.security.KeyPrivateKeypublic java.lang.String getFormat()
getFormat in interface java.security.KeyPrivateKeypublic int getInputLength()
public int maxOutputLength()
public java.math.BigInteger prime1()
public java.math.BigInteger prime2()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||