Go to the source code of this file.
|
| void | aes_encrypt (unsigned char *state, unsigned char *key) |
| | AES128 encryption: Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed. The AES implementation is in mode ECB (Electronic Code Book).
|
| |
| void | aes_decrypt (unsigned char *state, unsigned char *key) |
| | AES128 decryption: Given AES128 key and 16 bytes cipher text, plain text of 16 bytes is computed The AES implementation is in mode ECB (Electronic Code Book).
|
| |
| signed long | aes_read_key (unsigned char *key) |
| | Reads AES128 key from EEPROM Reads the AES128 key from fileID #12 in EEPROM returns an error if the key does not exist.
|
| |
| signed long | aes_write_key (unsigned char *key) |
| | writes AES128 key from EEPROM Writes the AES128 key to fileID #12 in EEPROM
|
| |
| #define AES128_KEY_SIZE 16 |
| void aes_encrypt |
( |
unsigned char * |
state, |
|
|
unsigned char * |
key |
|
) |
| |
AES128 encryption: Given AES128 key and 16 bytes plain text, cipher text of 16 bytes is computed. The AES implementation is in mode ECB (Electronic Code Book).
aes_encrypt
- Parameters
-
| [in] | key | AES128 key of size 16 bytes |
| in\out] | state 16 bytes of plain text and cipher text |
- Returns
- none
| void aes_decrypt |
( |
unsigned char * |
state, |
|
|
unsigned char * |
key |
|
) |
| |
AES128 decryption: Given AES128 key and 16 bytes cipher text, plain text of 16 bytes is computed The AES implementation is in mode ECB (Electronic Code Book).
aes_decrypt
- Parameters
-
| [in] | key | AES128 key of size 16 bytes |
| in\out] | state 16 bytes of cipher text and plain text |
- Returns
- none
| signed long aes_read_key |
( |
unsigned char * |
key | ) |
|
Reads AES128 key from EEPROM Reads the AES128 key from fileID #12 in EEPROM returns an error if the key does not exist.
aes_read_key
- Parameters
-
| [out] | key | AES128 key of size 16 bytes |
- Returns
- on success 0, error otherwise.
| signed long aes_write_key |
( |
unsigned char * |
key | ) |
|
writes AES128 key from EEPROM Writes the AES128 key to fileID #12 in EEPROM
aes_write_key
- Parameters
-
| [out] | key | AES128 key of size 16 bytes |
- Returns
- on success 0, error otherwise.