#include "beecrypt/beecrypt.h"
#include "beecrypt/aesopt.h"
Go to the source code of this file.
Data Structures | |
struct | aesParam |
Holds all the parameters necessary for the AES cipher. More... | |
Functions | |
BEECRYPTAPI int | aesSetup (aesParam *ap, const byte *key, size_t keybits, cipherOperation op) |
This function performs the cipher's key expansion. | |
BEECRYPTAPI int | aesSetIV (aesParam *ap, const byte *iv) |
This function sets the Initialization Vector. | |
BEECRYPTAPI int | aesSetCTR (aesParam *ap, const byte *nivz, size_t counter) |
This function sets the CTR mode counter. | |
BEECRYPTAPI 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. | |
BEECRYPTAPI 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. | |
BEECRYPTAPI uint32_t * | aesFeedback (aesParam *ap) |
Variables | |
const BEECRYPTAPI blockCipher | aes |
Holds the full API description of the AES algorithm. |
aesDecrypt | ( | aesParam * | ap, | |
uint32_t * | dst, | |||
const uint32_t * | src | |||
) |
This function performs the raw AES decryption; it decrypts one block of 128 bits.
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. |
0 | on success. |
aesEncrypt | ( | aesParam * | ap, | |
uint32_t * | dst, | |||
const uint32_t * | src | |||
) |
This function performs the raw AES encryption; it encrypts one block of 128 bits.
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. |
0 | on success. |
BEECRYPTAPI uint32_t* aesFeedback | ( | aesParam * | ap | ) |
This function sets the CTR mode counter.
ap | The cipher's parameter block. | |
nivz | The concatenation of Nonce, IV, and padding Zeroes. | |
counter | The counter. |
0 | on success. |
This function sets the Initialization Vector.
ap | The cipher's parameter block. | |
iv | The initialization vector; may be null. |
0 | on success. |
int aesSetup | ( | aesParam * | ap, | |
const byte * | key, | |||
size_t | keybits, | |||
cipherOperation | op | |||
) |
This function performs the cipher's key expansion.
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. |
0 | on success. | |
-1 | on failure. |
Holds the full API description of the AES algorithm.