class Aes (View source)

Methods

static ciphertext
cipher(input $input, w $w)

AES Cipher function: encrypt 'input' with Rijndael algorithm

static key
keyExpansion(key $key)

Key expansion for Rijndael cipher(): performs key expansion on cipher key to generate a key schedule

Details

at line line 19
static ciphertext cipher(input $input, w $w)

AES Cipher function: encrypt 'input' with Rijndael algorithm

Parameters

input $input message as byte-array (16 bytes)
w $w key schedule as 2D byte-array (Nr+1 x Nb bytes) - generated from the cipher key by keyExpansion()

Return Value

ciphertext as byte-array (16 bytes)

at line line 92
static key keyExpansion(key $key)

Key expansion for Rijndael cipher(): performs key expansion on cipher key to generate a key schedule

Parameters

key $key cipher key byte-array (16 bytes)

Return Value

key schedule as 2D byte-array (Nr+1 x Nb bytes)