|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface KeyPairGenRSA
Usually not to be used by applications. A generator for an RSA key pair.
The library contains a default implementation of this class, based on the JCE classes available in Java SE from 1.4.
The actual implementation class is chosen by the configuration option
"keypairgen.rsa", and then instantiated using the no-argument
constructor. The library uses each instance only for one key generation.
This object creates a key pair consisting of a public key
(e, N) and a private key
(d, N),
with e * d = 1 (mod φ(N)).
It also provides an
alternative form of the private key
(p, q, eP,
eQ, c),
with p, q primes, N = p * q,
eP = d mod p-1, eQ = e mod q-1,
and c * q = 1 mod p (i.e. c is an inverse of q
modulo p).
This form allows more efficient signing and
decryption operations, using the Chinese Remainder Theorem.
RSAPrivateCrtKey,
RSAPublicKey,
RFC 3447,
Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography
Specifications Version 2.1, Section 3: Key types| Method Summary | |
|---|---|
byte[] |
getC()
The chinese remainder coefficient c, i.e. the inverse of q modulo p. |
byte[] |
getD()
The decryption exponent d. |
byte[] |
getE()
The encryption exponent e. |
byte[] |
getEP()
The exponent to use modulo p. |
byte[] |
getEQ()
The exponent to use modulo q. |
byte[] |
getN()
The modulus of the key-pair. |
byte[] |
getP()
The prime p. |
byte[] |
getQ()
The prime q. |
void |
init(int key_size)
Generates a new key pair. |
| Method Detail |
|---|
void init(int key_size)
throws Exception
key_size - the number of bits of the key to be produced.
Exceptionbyte[] getD()
d.
byte[] getE()
e.
byte[] getN()
byte[] getC()
byte[] getEP()
byte[] getEQ()
byte[] getP()
byte[] getQ()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||