pic32cx_bz_crypto_cipher.c
void aesDecryptBlock(AesContext *context, const uint8_t *input, uint8_t *output)
Decrypt a 16-byte block using AES algorithm.
Definition: pic32cx_bz_crypto_cipher.c:281
void aesProcessData(AesContext *context, uint8_t *iv, const uint8_t *input, uint8_t *output, size_t length, uint32_t mode)
Perform AES encryption or decryption.
Definition: pic32cx_bz_crypto_cipher.c:147
Collection of AEAD algorithms.
error_t cbcDecrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CBC decryption.
Definition: pic32cx_bz_crypto_cipher.c:512
void gcmProcessAuthData(const uint8_t *aad, size_t aadLen)
Process additional authenticated data.
Definition: pic32cx_bz_crypto_cipher.c:1142
error_t cfbDecrypt(const CipherAlgo *cipher, void *context, uint_t s, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CFB decryption.
Definition: pic32cx_bz_crypto_cipher.c:696
void gcmSetMode(AesContext *context, uint32_t mode)
Set GCM operation mode.
Definition: pic32cx_bz_crypto_cipher.c:1020
error_t aesInit(AesContext *context, const uint8_t *key, size_t keyLen)
Key expansion.
Definition: pic32cx_bz_crypto_cipher.c:223
error_t cbcEncrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CBC encryption.
Definition: pic32cx_bz_crypto_cipher.c:432
error_t ctrEncrypt(const CipherAlgo *cipher, void *context, uint_t m, uint8_t *t, const uint8_t *p, uint8_t *c, size_t length)
CTR encryption.
Definition: pic32cx_bz_crypto_cipher.c:886
void gcmProcessData(const uint32_t *j, const uint8_t *input, uint8_t *output, size_t length)
Encrypt/decrypt payload data.
Definition: pic32cx_bz_crypto_cipher.c:1181
error_t ecbEncrypt(const CipherAlgo *cipher, void *context, const uint8_t *p, uint8_t *c, size_t length)
ECB encryption.
Definition: pic32cx_bz_crypto_cipher.c:301
void gcmGenerateTag(AesContext *context, const uint32_t *j, size_t aadLen, size_t dataLen, uint8_t *tag)
Calculate authentication tag.
Definition: pic32cx_bz_crypto_cipher.c:1294
General definitions for cryptographic algorithms.
error_t gcmEncrypt(GcmContext *context, const uint8_t *iv, size_t ivLen, const uint8_t *a, size_t aLen, const uint8_t *p, uint8_t *c, size_t length, uint8_t *t, size_t tLen)
Authenticated encryption using GCM.
Definition: pic32cx_bz_crypto_cipher.c:1401
PIC32CX BZ2 cipher hardware accelerator.
Block cipher modes of operation.
error_t cfbEncrypt(const CipherAlgo *cipher, void *context, uint_t s, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CFB encryption.
Definition: pic32cx_bz_crypto_cipher.c:603
void gcmUpdateGhash(const uint8_t *data)
Update GHASH value.
Definition: pic32cx_bz_crypto_cipher.c:1039
void aesProcessDataBlock(const uint8_t *input, uint8_t *output)
Encrypt/decrypt a 16-byte block using AES algorithm.
Definition: pic32cx_bz_crypto_cipher.c:109
PIC32CX BZ2 hardware cryptographic accelerator.
error_t gcmInit(GcmContext *context, const CipherAlgo *cipherAlgo, void *cipherContext)
Initialize GCM context.
Definition: pic32cx_bz_crypto_cipher.c:1366
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
void gcmGeneratePreCounterBlock(const uint8_t *iv, size_t ivLen, uint32_t *j)
Generate pre-counter block.
Definition: pic32cx_bz_crypto_cipher.c:1067
error_t ofbEncrypt(const CipherAlgo *cipher, void *context, uint_t s, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
OFB encryption.
Definition: pic32cx_bz_crypto_cipher.c:791
void aesEncryptBlock(AesContext *context, const uint8_t *input, uint8_t *output)
Encrypt a 16-byte block using AES algorithm.
Definition: pic32cx_bz_crypto_cipher.c:266
error_t ecbDecrypt(const CipherAlgo *cipher, void *context, const uint8_t *c, uint8_t *p, size_t length)
ECB decryption.
Definition: pic32cx_bz_crypto_cipher.c:365
void ctrIncBlock(uint8_t *ctr, uint32_t inc, size_t blockSize, size_t m)
Increment counter block.
Definition: ctr.c:138
void gcmGenerateHashSubKey(AesContext *context)
Generate hash subkey.
Definition: pic32cx_bz_crypto_cipher.c:977
Debugging facilities.
error_t gcmDecrypt(GcmContext *context, const uint8_t *iv, size_t ivLen, const uint8_t *a, size_t aLen, const uint8_t *c, uint8_t *p, size_t length, const uint8_t *t, size_t tLen)
Authenticated decryption using GCM.
Definition: pic32cx_bz_crypto_cipher.c:1457