edu.vt.middleware.crypt.asymmetric
Class RSA

java.lang.Object
  extended by edu.vt.middleware.crypt.AbstractAlgorithm
      extended by edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
          extended by edu.vt.middleware.crypt.asymmetric.AsymmetricAlgorithm
              extended by edu.vt.middleware.crypt.asymmetric.RSA
All Implemented Interfaces:
Algorithm, EncryptionAlgorithm

public class RSA
extends AsymmetricAlgorithm

RSA contains functions for encrypting and decrypting using the RSA algorithm. The encryption mode is set to 'NONE'. The padding is set to 'OAEP'. This classes defaults to a key creation length of 2048 bits.

Version:
$Revision: 3 $
Author:
Middleware Services

Field Summary
static String ALGORITHM
          Algorithm name.
static int DEFAULT_KEY_LENGTH
          Default key size for this algorithm in bits.
 
Fields inherited from class edu.vt.middleware.crypt.asymmetric.AsymmetricAlgorithm
MODE, PADDING
 
Fields inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
cipher, cipherMode, key, mode, padding
 
Fields inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
algorithm, logger, randomByteSize, randomProvider
 
Constructor Summary
RSA()
          Creates a default RSA asymmetric encryption algorithm that uses OAEP padding.
 
Method Summary
 int getDefaultKeyLength()
          Gets the default key length for this algorithm.
 
Methods inherited from class edu.vt.middleware.crypt.asymmetric.AsymmetricAlgorithm
generateKeys, generateKeys, generateKeys, getAlgorithmParameterSpec, getChunkSize, newInstance
 
Methods inherited from class edu.vt.middleware.crypt.AbstractEncryptionAlgorithm
crypt, crypt, decrypt, decrypt, decrypt, encrypt, encrypt, encrypt, getBlockSize, getCipherMode, getMode, getPadding, init, initCipher, initDecrypt, initEncrypt, setKey, toString
 
Methods inherited from class edu.vt.middleware.crypt.AbstractAlgorithm
getAlgorithm, getRandomData, setRandomProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.vt.middleware.crypt.Algorithm
getAlgorithm, getRandomData, setRandomProvider
 

Field Detail

ALGORITHM

public static final String ALGORITHM
Algorithm name.

See Also:
Constant Field Values

DEFAULT_KEY_LENGTH

public static final int DEFAULT_KEY_LENGTH
Default key size for this algorithm in bits.

See Also:
Constant Field Values
Constructor Detail

RSA

public RSA()
Creates a default RSA asymmetric encryption algorithm that uses OAEP padding.

Method Detail

getDefaultKeyLength

public int getDefaultKeyLength()
Gets the default key length for this algorithm.

Overrides:
getDefaultKeyLength in class AsymmetricAlgorithm
Returns:
Default key length in bits.


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.