com.maverick.ssh.components.jce
Class Ssh2RsaPrivateCrtKey

java.lang.Object
  extended bycom.maverick.ssh.components.jce.Ssh2RsaPrivateCrtKey
All Implemented Interfaces:
SshPrivateKey, SshRsaPrivateCrtKey, SshRsaPrivateKey

public class Ssh2RsaPrivateCrtKey
extends java.lang.Object
implements SshRsaPrivateCrtKey

RSA co-efficient private key implementation for SSH2 protocol.

Author:
Lee David Painter

Field Summary
protected  java.security.interfaces.RSAPrivateCrtKey prv
           
 
Constructor Summary
Ssh2RsaPrivateCrtKey(java.math.BigInteger modulus, java.math.BigInteger publicExponent, java.math.BigInteger privateExponent, java.math.BigInteger primeP, java.math.BigInteger primeQ, java.math.BigInteger primeExponentP, java.math.BigInteger primeExponentQ, java.math.BigInteger crtCoefficient)
           
Ssh2RsaPrivateCrtKey(java.security.interfaces.RSAPrivateCrtKey prv)
           
 
Method Summary
 java.math.BigInteger doPrivate(java.math.BigInteger input)
           
 java.lang.String getAlgorithm()
           
 java.math.BigInteger getCrtCoefficient()
           
 java.math.BigInteger getModulus()
           
 java.math.BigInteger getPrimeExponentP()
           
 java.math.BigInteger getPrimeExponentQ()
           
 java.math.BigInteger getPrimeP()
           
 java.math.BigInteger getPrimeQ()
           
 java.math.BigInteger getPrivateExponent()
           
 java.math.BigInteger getPublicExponent()
           
 byte[] sign(byte[] msg)
          Create a signature from the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prv

protected java.security.interfaces.RSAPrivateCrtKey prv
Constructor Detail

Ssh2RsaPrivateCrtKey

public Ssh2RsaPrivateCrtKey(java.security.interfaces.RSAPrivateCrtKey prv)

Ssh2RsaPrivateCrtKey

public Ssh2RsaPrivateCrtKey(java.math.BigInteger modulus,
                            java.math.BigInteger publicExponent,
                            java.math.BigInteger privateExponent,
                            java.math.BigInteger primeP,
                            java.math.BigInteger primeQ,
                            java.math.BigInteger primeExponentP,
                            java.math.BigInteger primeExponentQ,
                            java.math.BigInteger crtCoefficient)
                     throws java.security.NoSuchAlgorithmException,
                            java.security.spec.InvalidKeySpecException
Method Detail

doPrivate

public java.math.BigInteger doPrivate(java.math.BigInteger input)
                               throws SshException
Specified by:
doPrivate in interface SshRsaPrivateCrtKey
Throws:
SshException

getCrtCoefficient

public java.math.BigInteger getCrtCoefficient()
Specified by:
getCrtCoefficient in interface SshRsaPrivateCrtKey

getPrimeExponentP

public java.math.BigInteger getPrimeExponentP()
Specified by:
getPrimeExponentP in interface SshRsaPrivateCrtKey

getPrimeExponentQ

public java.math.BigInteger getPrimeExponentQ()
Specified by:
getPrimeExponentQ in interface SshRsaPrivateCrtKey

getPrimeP

public java.math.BigInteger getPrimeP()
Specified by:
getPrimeP in interface SshRsaPrivateCrtKey

getPrimeQ

public java.math.BigInteger getPrimeQ()
Specified by:
getPrimeQ in interface SshRsaPrivateCrtKey

getPublicExponent

public java.math.BigInteger getPublicExponent()
Specified by:
getPublicExponent in interface SshRsaPrivateCrtKey

getModulus

public java.math.BigInteger getModulus()
Specified by:
getModulus in interface SshRsaPrivateKey

getPrivateExponent

public java.math.BigInteger getPrivateExponent()
Specified by:
getPrivateExponent in interface SshRsaPrivateKey

sign

public byte[] sign(byte[] msg)
            throws java.io.IOException
Description copied from interface: SshPrivateKey
Create a signature from the data.

Specified by:
sign in interface SshRsaPrivateKey
Throws:
java.io.IOException

getAlgorithm

public java.lang.String getAlgorithm()
Specified by:
getAlgorithm in interface SshPrivateKey


Copyright © 2003 3SP LTD. All Rights Reserved.