com.maverick.ssh.components.jce
Class Ssh2RsaPrivateCrtKey
java.lang.Object
com.maverick.ssh.components.jce.Ssh2RsaPrivateCrtKey
- All Implemented Interfaces:
- SshPrivateKey, SshRsaPrivateCrtKey, SshRsaPrivateKey
public class Ssh2RsaPrivateCrtKey
- extends Object
- implements SshRsaPrivateCrtKey
RSA co-efficient private key implementation for SSH2 protocol.
- Author:
- Lee David Painter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prv
protected RSAPrivateCrtKey prv
Ssh2RsaPrivateCrtKey
public Ssh2RsaPrivateCrtKey(RSAPrivateCrtKey prv)
Ssh2RsaPrivateCrtKey
public Ssh2RsaPrivateCrtKey(BigInteger modulus,
BigInteger publicExponent,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger primeExponentP,
BigInteger primeExponentQ,
BigInteger crtCoefficient)
throws NoSuchAlgorithmException,
InvalidKeySpecException
- Throws:
NoSuchAlgorithmException
InvalidKeySpecException
doPrivate
public BigInteger doPrivate(BigInteger input)
throws SshException
- Specified by:
doPrivate in interface SshRsaPrivateCrtKey
- Throws:
SshException
getCrtCoefficient
public BigInteger getCrtCoefficient()
- Specified by:
getCrtCoefficient in interface SshRsaPrivateCrtKey
getPrimeExponentP
public BigInteger getPrimeExponentP()
- Specified by:
getPrimeExponentP in interface SshRsaPrivateCrtKey
getPrimeExponentQ
public BigInteger getPrimeExponentQ()
- Specified by:
getPrimeExponentQ in interface SshRsaPrivateCrtKey
getPrimeP
public BigInteger getPrimeP()
- Specified by:
getPrimeP in interface SshRsaPrivateCrtKey
getPrimeQ
public BigInteger getPrimeQ()
- Specified by:
getPrimeQ in interface SshRsaPrivateCrtKey
getPublicExponent
public BigInteger getPublicExponent()
- Specified by:
getPublicExponent in interface SshRsaPrivateCrtKey
getModulus
public BigInteger getModulus()
- Specified by:
getModulus in interface SshRsaPrivateKey
getPrivateExponent
public BigInteger getPrivateExponent()
- Specified by:
getPrivateExponent in interface SshRsaPrivateKey
sign
public byte[] sign(byte[] msg)
throws IOException
- Description copied from interface:
SshPrivateKey
- Create a signature from the data.
- Specified by:
sign in interface SshPrivateKey- Specified by:
sign in interface SshRsaPrivateKey
- Returns:
- byte[]
- Throws:
IOException
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithm in interface SshPrivateKey
getJCEPrivateKey
public PrivateKey getJCEPrivateKey()
Copyright © 2013. All Rights Reserved.