Go to the source code of this file.
◆ MAX_AES_KEY_LENGTH
#define MAX_AES_KEY_LENGTH 256 |
Maximum supported key length.
◆ my_aes_create_key()
void my_aes_create_key |
( |
const unsigned char * |
key, |
|
|
uint |
key_length, |
|
|
uint8 * |
rkey, |
|
|
enum my_aes_opmode |
opmode |
|
) |
| |
Transforms an arbitrary long key into a fixed length AES key.
AES keys are of fixed length. This routine takes an arbitrary long key iterates over it in AES key length increment and XORs the bytes with the AES key buffer being prepared. The bytes from the last incomplete iteration are XORed to the start of the key until their depletion. Needed since crypto function routines expect a fixed length key.
- Parameters
-
[in] | key | Key to use for real key creation |
[in] | key_length | Length of the key |
[out] | rkey | Real key (used by OpenSSL) |
[out] | opmode | encryption mode |
◆ my_aes_opmode_key_sizes
uint* my_aes_opmode_key_sizes |
|
extern |