Interface AbstractAES

All Known Implementing Classes:
AES

interface AbstractAES

This interface specifies the Advanced Encryption Standard (AES) cipher. AES is documented in Federal Information Processing Standards Publication (FIPS PUB) 197. Implementations should include a constructor of the form

AES(byte[] z)
that constructs an AES cipher using a specific 128-, 192- or 256-bit (i.e. 16-, 24- or 32-byte) secret key z. The constructor should throw IllegalArgumentException if the length of z is not 128, 192 or 256 bits (i.e. 16, 24 or 32 bytes); otherwise, it should generate the key schedule w expanded from z.

Author:
Craig A. Rich

Method Summary
 byte[] decrypt(byte[] y)
          Decrypts a 128-bit (16-byte) ciphertext block using this AES cipher
 byte[] encrypt(byte[] x)
          Encrypts a 128-bit (16-byte) plaintext block using this AES cipher
 

Method Detail

encrypt

byte[] encrypt(byte[] x)
Encrypts a 128-bit (16-byte) plaintext block using this AES cipher

Parameters:
x - The 128-bit (16-byte) plaintext block to be encrypted.
Returns:
The 128-bit (16-byte) ciphertext block produced by encryption.
Throws:
java.lang.IllegalArgumentException - if the plaintext block is not 128 bits (i.e. 16 bytes)

decrypt

byte[] decrypt(byte[] y)
Decrypts a 128-bit (16-byte) ciphertext block using this AES cipher

Parameters:
y - The 128-bit (16-byte) ciphertext block to be decrypted.
Returns:
The 128-bit (16-byte) plaintext block produced by decryption.
Throws:
java.lang.IllegalArgumentException - if the ciphertext block is not 128 bits (i.e. 16 bytes)