part2
Class CRTRSAPrivateKey

java.lang.Object
  extended bypart2.CRTRSAPrivateKey
All Implemented Interfaces:
RSAPrivateKey

public class CRTRSAPrivateKey
extends java.lang.Object
implements RSAPrivateKey

A class that implements a CRT RSA private key.


Constructor Summary
CRTRSAPrivateKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger d)
          A constructor for a CRT RSA private key using primes p and q, and priavte exponent d.
 
Method Summary
 java.lang.String decrypt(java.util.AbstractList cipherText)
          A method to decrypt the ciphertext cipherText to a string value using this private key.
 java.math.BigInteger decrypt(java.math.BigInteger cipherText)
          A method to decrypt the ciphertext cipherText to a big integer value using the private key key.
 java.math.BigInteger modulus()
          A method to return the modulus of this private RSA key.
 java.math.BigInteger privateExponent()
          A method to return the private exponent of this private RSA key.
 java.lang.String toString()
          A method to produce a string representation of this private RSA key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CRTRSAPrivateKey

public CRTRSAPrivateKey(java.math.BigInteger p,
                        java.math.BigInteger q,
                        java.math.BigInteger d)
                 throws java.lang.Exception
A constructor for a CRT RSA private key using primes p and q, and priavte exponent d.

Throws:
Exception.
java.lang.Exception
Method Detail

modulus

public java.math.BigInteger modulus()
                             throws java.lang.Exception
A method to return the modulus of this private RSA key.

Throws:
Exception.
java.lang.Exception

privateExponent

public java.math.BigInteger privateExponent()
                                     throws java.lang.Exception
A method to return the private exponent of this private RSA key.

Throws:
Exception.
java.lang.Exception

toString

public java.lang.String toString()
A method to produce a string representation of this private RSA key.

Throws:
Exception.

decrypt

public java.math.BigInteger decrypt(java.math.BigInteger cipherText)
                             throws java.lang.Exception
A method to decrypt the ciphertext cipherText to a big integer value using the private key key.

Specified by:
decrypt in interface RSAPrivateKey
Throws:
Exception.
java.lang.Exception

decrypt

public java.lang.String decrypt(java.util.AbstractList cipherText)
                         throws java.lang.Exception
A method to decrypt the ciphertext cipherText to a string value using this private key.

Specified by:
decrypt in interface RSAPrivateKey
Throws:
Exception.
java.lang.Exception