cryptix.provider.rsa
public abstract class BaseRSAPrivateKey extends Object implements CryptixRSAPrivateKey, RSAFactors
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.7 $
Since: Cryptix 2.2.2
Constructor Summary | |
---|---|
protected | BaseRSAPrivateKey()
Constructs an RSA private key, without setting the parameters.
|
Method Summary | |
---|---|
String | getAlgorithm()
Returns the name of the algorithm, for this class always "RSA".
|
BigInteger | getExponent()
Return the private exponent d.
|
BigInteger | getInverseOfQModP()
Returns the multiplicative inverse of q modulo p. |
BigInteger | getModulus()
Return the public modulus n: the product of both p
and q.
|
BigInteger | getP()
Returns p, the first factor of the public modulus.
|
BigInteger | getQ()
Return q, the second factor of the public modulus.
|
protected void | setRsaParams(BigInteger n, BigInteger d)
Sets the RSA parameters n and d.
|
protected void | setRsaParams(BigInteger d, BigInteger p, BigInteger q, BigInteger u)
Sets the RSA parameters d, p, q, and u,
to allow fast execution of mathematical operations performed later
on during the life of this key. |
String | toString()
Returns a string representation of this key. |
Returns: the name of the algorithm, "RSA".
Returns: the private exponent d.
Returns: the multiplicative inverse of q modulo p.
Returns: the public modulus n: the product of both p and q.
Returns: the first factor p
Returns: the second factor q
Throws: NullPointerException if n == null || d == null
Throws: NullPointerException if d == null || p == null || q == null InvalidParameterException if u must be calculated, and gcd(q, p) != 1
Returns: a string representation of this key.