NimBLE-Arduino 2.1.2
|
– Interface to an AES-128 implementation. More...
Go to the source code of this file.
Functions | |
int | tc_aes128_set_encrypt_key (TCAesKeySched_t s, const uint8_t *k) |
Set AES-128 encryption key Uses key k to initialize s. | |
int | tc_aes_encrypt (uint8_t *out, const uint8_t *in, const TCAesKeySched_t s) |
AES-128 Encryption procedure Encrypts contents of in buffer into out buffer under key; schedule s. | |
int | tc_aes128_set_decrypt_key (TCAesKeySched_t s, const uint8_t *k) |
Set the AES-128 decryption key Uses key k to initialize s. | |
int | tc_aes_decrypt (uint8_t *out, const uint8_t *in, const TCAesKeySched_t s) |
AES-128 Encryption procedure Decrypts in buffer into out buffer under key schedule s. | |
– Interface to an AES-128 implementation.
Overview: AES-128 is a NIST approved block cipher specified in FIPS 197. Block ciphers are deterministic algorithms that perform a transformation specified by a symmetric key in fixed- length data sets, also called blocks.
Security: AES-128 provides approximately 128 bits of security.
Usage: 1) call tc_aes128_set_encrypt/decrypt_key to set the key.
2) call tc_aes_encrypt/decrypt to process the data.
int tc_aes128_set_decrypt_key | ( | TCAesKeySched_t | s, |
const uint8_t * | k | ||
) |
Set the AES-128 decryption key Uses key k to initialize s.
s | IN/OUT – initialized struct tc_aes_key_sched_struct |
k | IN – points to the AES key |
int tc_aes128_set_encrypt_key | ( | TCAesKeySched_t | s, |
const uint8_t * | k | ||
) |
Set AES-128 encryption key Uses key k to initialize s.
s | IN/OUT – initialized struct tc_aes_key_sched_struct |
k | IN – points to the AES key |
int tc_aes_decrypt | ( | uint8_t * | out, |
const uint8_t * | in, | ||
const TCAesKeySched_t | s | ||
) |
AES-128 Encryption procedure Decrypts in buffer into out buffer under key schedule s.
out | IN/OUT – buffer to receive ciphertext block |
in | IN – a plaintext block to encrypt |
s | IN – initialized AES key schedule |
int tc_aes_encrypt | ( | uint8_t * | out, |
const uint8_t * | in, | ||
const TCAesKeySched_t | s | ||
) |
AES-128 Encryption procedure Encrypts contents of in buffer into out buffer under key; schedule s.
out | IN/OUT – buffer to receive ciphertext block |
in | IN – a plaintext block to encrypt |
s | IN – initialized AES key schedule |