|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.crypto.blockcipher.BlockCipher
edu.rit.crypto.blockcipher.AES256CipherSmp
public class AES256CipherSmp
Class AES256CipherSmp provides a BlockCipher using the Advanced Encryption Standard (AES) with a 128-bit (16-byte) block length and a 256-bit (32-byte) key length. The AES specification may be found at http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf.
Unlike class AES256Cipher, class AES256CipherSmp includes extra padding in the memory layout to avoid cache interference when running a program with multiple threads on an SMP parallel computer.
Note: However, class AES256CipherSmp is not multiple thread safe.
| Constructor Summary | |
|---|---|
AES256CipherSmp(byte[] theKey)
Construct a new AES-256 cipher object with the given secret key. |
|
| Method Summary | |
|---|---|
void |
encrypt(byte[] thePlaintext,
byte[] theCiphertext)
Encrypt the given plaintext block. |
void |
erase()
Erase this block cipher object's key material. |
protected void |
finalize()
Finalize this block cipher object. |
void |
setKey(byte[] theKey)
Set the key to be used for all subsequent encryptions and decryptions. |
| Methods inherited from class edu.rit.crypto.blockcipher.BlockCipher |
|---|
encrypt, getBlockLength, getKeyLength |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AES256CipherSmp(byte[] theKey)
theKey - Key (byte array).
NullPointerException - (unchecked exception) Thrown if theKey is null.
IllegalArgumentException - (unchecked exception) Thrown if theKey.length < 32.| Method Detail |
|---|
public void setKey(byte[] theKey)
setKey in class BlockCiphertheKey - Key (byte array).
NullPointerException - (unchecked exception) Thrown if theKey is null.
IllegalArgumentException - (unchecked exception) Thrown if theKey.length < 32.
public void encrypt(byte[] thePlaintext,
byte[] theCiphertext)
encrypt in class BlockCipherthePlaintext - Input plaintext block to be encrypted.theCiphertext - Output ciphertext block.
NullPointerException - (unchecked exception) Thrown if thePlaintext is null or
theCiphertext is null.
IllegalArgumentException - (unchecked exception) Thrown if thePlaintext.length < 16
or theCiphertext.length < 16.
IllegalStateException - (unchecked exception) Thrown if the key has been erased and not
re-set.public void erase()
erase in class BlockCipherprotected void finalize()
finalize in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||