|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cryptix.provider.rsa.BaseRSAPrivateKey
An abstract class representing an RSA private key.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.7 $
Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
Constructor Summary | |
protected |
BaseRSAPrivateKey()
Constructs an RSA private key, without setting the parameters. |
Method Summary | |
java.lang.String |
getAlgorithm()
Returns the name of the algorithm, for this class always "RSA". |
java.math.BigInteger |
getExponent()
Return the private exponent d. |
java.math.BigInteger |
getInverseOfQModP()
Returns the multiplicative inverse of q modulo p. |
java.math.BigInteger |
getModulus()
Return the public modulus n: the product of both p and q. |
java.math.BigInteger |
getP()
Returns p, the first factor of the public modulus. |
java.math.BigInteger |
getQ()
Return q, the second factor of the public modulus. |
protected void |
setRsaParams(java.math.BigInteger n,
java.math.BigInteger d)
Sets the RSA parameters n and d. |
protected void |
setRsaParams(java.math.BigInteger d,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.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. |
java.lang.String |
toString()
Returns a string representation of this key. |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface java.security.Key |
getEncoded, getFormat |
Constructor Detail |
protected BaseRSAPrivateKey()
Method Detail |
public java.math.BigInteger getModulus()
getModulus
in interface RSAKey
public java.math.BigInteger getExponent()
getExponent
in interface RSAKey
public java.math.BigInteger getP()
getP
in interface RSAFactors
public java.math.BigInteger getQ()
getQ
in interface RSAFactors
public java.math.BigInteger getInverseOfQModP()
getInverseOfQModP
in interface RSAFactors
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
protected void setRsaParams(java.math.BigInteger n, java.math.BigInteger d)
NullPointerException
- if n == null || d == nullprotected void setRsaParams(java.math.BigInteger d, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger u)
NullPointerException
- if d == null || p == null || q == nulljava.security.InvalidParameterException
- if u must be calculated, and
gcd(q, p) != 1public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |