|
ruuvi.drivers.c ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
Functions for cryptography operations. More...
Files | |
| file | ruuvi_interface_aes.h |
Functions | |
| rd_status_t | ri_aes_ecb_128_encrypt (const uint8_t *const cleartext, uint8_t *const ciphertext, const uint8_t *const key, const size_t data_length) |
| encrypt a block with AES ECB 128 encryption | |
Functions for cryptography operations.
These functions are in drivers because they are supposed to utilize hardware implementation in underlying ICs. A software fallback might be implemented later.
| rd_status_t ri_aes_ecb_128_encrypt | ( | const uint8_t *const | cleartext, |
| uint8_t *const | ciphertext, | ||
| const uint8_t *const | key, | ||
| const size_t | data_length | ||
| ) |
encrypt a block with AES ECB 128 encryption
This call takes 16-byte divisible data as input and encrypts it with AES Electronic Codebook.
| [in] | cleartext | Data to encrypt. Must have 16-byte divisible length. |
| [out] | ciphertext | Encryped data output |
| [in] | key | Key to encrypt data with. Must be exactly 16 bytes. |
| [in] | data_length | Length of data. Input must equal output, must be 16 bytes divisible. |
| RD_SUCCESS | data was encrypted. |
| RD_ERROR_NULL | if any pointer is NULL |
| RD_ERROR_INVALID_LENGTH | if data length is not a multiple of 16 |