|
RadioLib
Universal wireless communication library for Arduino
|
Class to perform AES encryption and decryption in software only. Contains implementation of pure virtual methods from RadioLibAES128. More...
#include <Cryptography.h>
Public Member Functions | |
| RadioLibSoftwareAES128 () | |
| Default constructor. | |
| void | init (uint8_t *key) override |
| Initialize the AES. | |
| size_t | encryptECB (const uint8_t *in, size_t len, uint8_t *out) override |
| Perform ECB-type AES encryption. | |
| size_t | decryptECB (const uint8_t *in, size_t len, uint8_t *out) override |
| Perform ECB-type AES decryption. | |
Public Member Functions inherited from RadioLibAES128 | |
| RadioLibAES128 () | |
| Default constructor. | |
| void | generateCMAC (const uint8_t *in, size_t len, uint8_t *cmac) |
| Calculate message authentication code according to RFC4493. | |
| void | initCMAC (RadioLibCmacState *st) |
| Initialize the CMAC state. This must be called before any updateCMAC calls. | |
| void | updateCMAC (RadioLibCmacState *st, const uint8_t *data, size_t len) |
| Update the CMAC state with a chunk of data. This can be called multiple times to process the data in chunks. | |
| void | finishCMAC (RadioLibCmacState *st, uint8_t *out) |
| Finalize the CMAC calculation and save the result. This must be called after all updateCMAC calls are done. | |
| bool | verifyCMAC (const uint8_t *in, size_t len, const uint8_t *cmac) |
| Verify the received CMAC. This just calculates the CMAC again and compares the results. | |
Class to perform AES encryption and decryption in software only. Contains implementation of pure virtual methods from RadioLibAES128.
Most of the implementation here is adapted from https://github.com/kokke/tiny-AES-c
|
overridevirtual |
Perform ECB-type AES decryption.
| in | Input ciphertext data. |
| len | Length of the input data. |
| out | Buffer to save the output plaintext into. It is up to the caller to ensure the buffer is sufficiently large to save the data! |
Implements RadioLibAES128.
|
overridevirtual |
Perform ECB-type AES encryption.
| in | Input plaintext data (unpadded). |
| len | Length of the input data. |
| out | Buffer to save the output ciphertext into. It is up to the caller to ensure the buffer is sufficiently large to save the data! |
Implements RadioLibAES128.
|
overridevirtual |