public final class Rsa extends Object
Constructor and Description |
---|
Rsa() |
Modifier and Type | Method and Description |
---|---|
static BigInteger |
doPrivate(BigInteger input,
BigInteger modulus,
BigInteger privateExponent) |
static BigInteger |
doPrivateCrt(BigInteger input,
BigInteger privateExponent,
BigInteger primeP,
BigInteger primeQ,
BigInteger crtCoefficient) |
static BigInteger |
doPrivateCrt(BigInteger input,
BigInteger p,
BigInteger q,
BigInteger dP,
BigInteger dQ,
BigInteger qInv) |
static BigInteger |
doPublic(BigInteger input,
BigInteger modulus,
BigInteger publicExponent) |
static Ssh2RsaPrivateCrtKey |
generateKey(int bits,
BigInteger e,
SecureRandom secRand) |
static Ssh2RsaPrivateCrtKey |
generateKey(int bits,
SecureRandom secRand) |
static BigInteger |
getPrimeExponent(BigInteger privateExponent,
BigInteger prime) |
static BigInteger |
padPKCS1(BigInteger input,
int type,
int padLen) |
static BigInteger |
removePKCS1(BigInteger input,
int type) |
public static BigInteger doPrivateCrt(BigInteger input, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger crtCoefficient)
public static BigInteger doPrivateCrt(BigInteger input, BigInteger p, BigInteger q, BigInteger dP, BigInteger dQ, BigInteger qInv)
public static BigInteger getPrimeExponent(BigInteger privateExponent, BigInteger prime)
public static BigInteger padPKCS1(BigInteger input, int type, int padLen) throws IllegalStateException
IllegalStateException
public static BigInteger removePKCS1(BigInteger input, int type) throws IllegalStateException
IllegalStateException
public static Ssh2RsaPrivateCrtKey generateKey(int bits, SecureRandom secRand) throws NoSuchAlgorithmException, InvalidKeySpecException
public static Ssh2RsaPrivateCrtKey generateKey(int bits, BigInteger e, SecureRandom secRand) throws NoSuchAlgorithmException, InvalidKeySpecException
public static BigInteger doPublic(BigInteger input, BigInteger modulus, BigInteger publicExponent)
public static BigInteger doPrivate(BigInteger input, BigInteger modulus, BigInteger privateExponent)
Copyright © 2024. All rights reserved.