AES block cipher, as specified by NIST FIPS 197.
More...
Go to the source code of this file.
|
struct | aesParam |
| Holds all the parameters necessary for the AES cipher. More...
|
|
|
int | aesSetup (aesParam *ap, const byte *key, size_t keybits, cipherOperation op) |
| This function performs the cipher's key expansion. More...
|
|
int | aesSetIV (aesParam *ap, const byte *iv) |
| This function sets the Initialization Vector. More...
|
|
int | aesSetCTR (aesParam *ap, const byte *nivz, size_t counter) |
| This function sets the CTR mode counter. More...
|
|
int | aesEncrypt (aesParam *ap, uint32_t *dst, const uint32_t *src) |
| This function performs the raw AES encryption; it encrypts one block of 128 bits. More...
|
|
int | aesDecrypt (aesParam *ap, uint32_t *dst, const uint32_t *src) |
| This function performs the raw AES decryption; it decrypts one block of 128 bits. More...
|
|
uint32_t * | aesFeedback (aesParam *ap) |
|
AES block cipher, as specified by NIST FIPS 197.
- Author
- Bob Deblier bob.d.nosp@m.ebli.nosp@m.er@te.nosp@m.lene.nosp@m.t.be
aesDecrypt |
( |
aesParam * |
ap, |
|
|
uint32_t * |
dst, |
|
|
const uint32_t * |
src |
|
) |
| |
This function performs the raw AES decryption; it decrypts one block of 128 bits.
- Parameters
-
ap | The cipher's parameter block. |
dst | The cleartext; should be aligned on 32-bit boundary. |
src | The ciphertext; should be aligned on 32-bit boundary. |
- Return values
-
aesEncrypt |
( |
aesParam * |
ap, |
|
|
uint32_t * |
dst, |
|
|
const uint32_t * |
src |
|
) |
| |
This function performs the raw AES encryption; it encrypts one block of 128 bits.
- Parameters
-
ap | The cipher's parameter block. |
dst | The ciphertext; should be aligned on 32-bit boundary. |
src | The cleartext; should be aligned on 32-bit boundary. |
- Return values
-
int aesSetCTR |
( |
aesParam * |
ap, |
|
|
const byte * |
nivz, |
|
|
size_t |
counter |
|
) |
| |
This function sets the CTR mode counter.
- Note
- This function is only useful in CTR modes.
- Parameters
-
ap | The cipher's parameter block. |
nivz | The concatenation of Nonce, IV, and padding Zeroes. |
counter | The counter. |
- Return values
-
This function sets the Initialization Vector.
- Note
- This function is only useful in block chaining or feedback modes.
- Parameters
-
ap | The cipher's parameter block. |
iv | The initialization vector; may be null. |
- Return values
-
This function performs the cipher's key expansion.
- Parameters
-
ap | The cipher's parameter block. |
key | The key value. |
keybits | The number of bits in the key; legal values are: 128, 192 and 256. |
op | ENCRYPT or DECRYPT. |
- Return values
-
0 | on success. |
-1 | on failure. |
Holds the full API description of the AES algorithm.