|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cryptix.provider.rsa.BaseRSAPrivateKey | +--cryptix.provider.rsa.RawRSAPrivateKey
A class representing a RAW-encoded RSA private key.
The encoding consists of the following, in order:
Each integer is represented as follows:
Byte Length offset (bytes) Meaning 0 2 The length in bits of this BigInteger (MSB first); 2 variable The BigInteger's magnitude with no leading zeroes, again MSB first.
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 | |
RawRSAPrivateKey(java.math.BigInteger n,
java.math.BigInteger d)
Constructs a raw RSA private key given the private exponent, and the public modulus n. |
|
RawRSAPrivateKey(java.math.BigInteger d,
java.math.BigInteger p,
java.math.BigInteger q)
Constructs a raw RSA private key given the private exponent, and the two factors used to generate the public modulus n. |
|
RawRSAPrivateKey(java.math.BigInteger d,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger u)
Constructs a raw RSA private key given the private exponent, and the two factors used to generate the public modulus n. |
|
RawRSAPrivateKey(java.io.InputStream is)
Constructs a raw RSA private key from data read from an InputStream, encoded as described above. |
Method Summary | |
byte[] |
getEncoded()
Returns an encoding of the key as a byte array, as described above. |
java.lang.String |
getFormat()
Returns the encoding format name, for this class always "RAW". |
Methods inherited from class cryptix.provider.rsa.BaseRSAPrivateKey |
getAlgorithm, getExponent, getInverseOfQModP, getModulus, getP, getQ, setRsaParams, setRsaParams, toString |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public RawRSAPrivateKey(java.math.BigInteger n, java.math.BigInteger d)
d
- the private exponentn
- the public moduluspublic RawRSAPrivateKey(java.math.BigInteger d, java.math.BigInteger p, java.math.BigInteger q)
d
- the private exponentp
- the first factor of the public modulusq
- the second factor of the public moduluspublic RawRSAPrivateKey(java.math.BigInteger d, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger u)
d
- the private exponentp
- the first factor of the public modulusq
- the second factor of the public modulusu
- the multiplicative inverse of q modulo ppublic RawRSAPrivateKey(java.io.InputStream is) throws java.io.IOException
is
- the input stream from which data is parsed.java.io.IOException
- if any I/O error occurs.getEncoded()
Method Detail |
public java.lang.String getFormat()
public byte[] getEncoded()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |