Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.security.publickey
Class RSAAlgorithm

    java.lang.Object
      com.mindbright.security.publickey.RSAAlgorithm

public final class RSAAlgorithm
extends java.lang.Object

Constructor Summary
`RSAAlgorithm()`

Method Summary
`static java.math.BigInteger` | `addPKCS1Pad(java.math.BigInteger input, int type, int padLen, SecureRandom rand)`
`static java.math.BigInteger` | `doPrivate(java.math.BigInteger input, java.math.BigInteger modulus, java.math.BigInteger privateExponent)`
`static java.math.BigInteger` | `doPrivateCrt(java.math.BigInteger input, java.math.BigInteger privateExponent, java.math.BigInteger primeP, java.math.BigInteger primeQ, java.math.BigInteger crtCoefficient)`
`static java.math.BigInteger` | `doPrivateCrt(java.math.BigInteger input, java.math.BigInteger primeP, java.math.BigInteger primeQ, java.math.BigInteger primeExponentP, java.math.BigInteger primeExponentQ, java.math.BigInteger crtCoefficient)`
`static java.math.BigInteger` | `doPublic(java.math.BigInteger input, java.math.BigInteger modulus, java.math.BigInteger publicExponent)`
`static KeyPair` | `generateKeyPair(int bits, java.math.BigInteger e, SecureRandom secRand)`
`static KeyPair` | `generateKeyPair(int bits, SecureRandom secRand)`
`static java.math.BigInteger` | `getPrimeExponent(java.math.BigInteger privateExponent, java.math.BigInteger prime)`
`static java.math.BigInteger` | `stripPKCS1Pad(java.math.BigInteger input, int type)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RSAAlgorithm

    public RSAAlgorithm()

Method Detail

### doPublic

    public static java.math.BigInteger doPublic(java.math.BigInteger input,
                                                java.math.BigInteger modulus,
                                                java.math.BigInteger publicExponent)

### doPrivate

    public static java.math.BigInteger doPrivate(java.math.BigInteger input,
                                                 java.math.BigInteger modulus,
                                                 java.math.BigInteger privateExponent)

### doPrivateCrt

    public static java.math.BigInteger doPrivateCrt(java.math.BigInteger input,
                                                    java.math.BigInteger privateExponent,
                                                    java.math.BigInteger primeP,
                                                    java.math.BigInteger primeQ,
                                                    java.math.BigInteger crtCoefficient)

### doPrivateCrt

    public static java.math.BigInteger doPrivateCrt(java.math.BigInteger input,
                                                    java.math.BigInteger primeP,
                                                    java.math.BigInteger primeQ,
                                                    java.math.BigInteger primeExponentP,
                                                    java.math.BigInteger primeExponentQ,
                                                    java.math.BigInteger crtCoefficient)

### getPrimeExponent

    public static java.math.BigInteger getPrimeExponent(java.math.BigInteger privateExponent,
                                                        java.math.BigInteger prime)

### addPKCS1Pad

    public static java.math.BigInteger addPKCS1Pad(java.math.BigInteger input,
                                                   int type,
                                                   int padLen,
                                                   SecureRandom rand)
                                            throws SignatureException

  Throws:
    `SignatureException`

### stripPKCS1Pad

    public static java.math.BigInteger stripPKCS1Pad(java.math.BigInteger input,
                                                     int type)
                                              throws SignatureException

  Throws:
    `SignatureException`

### generateKeyPair

    public static KeyPair generateKeyPair(int bits,
                                          SecureRandom secRand)

### generateKeyPair

    public static KeyPair generateKeyPair(int bits,
                                          java.math.BigInteger e,
                                          SecureRandom secRand)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD