apm32f4xx_crypto_cipher.c
#define CRYP_CTRL_ALGOMSEL_AES_KEY
Definition: apm32f4xx_crypto_cipher.h:64
error_t desInit(DesContext *context, const uint8_t *key, size_t keyLen)
Initialize a DES context using the supplied key.
Definition: apm32f4xx_crypto_cipher.c:160
#define CRYP_CTRL_ALGOMSEL_AES_ECB
Definition: apm32f4xx_crypto_cipher.h:61
void aesEncryptBlock(AesContext *context, const uint8_t *input, uint8_t *output)
Encrypt a 16-byte block using AES algorithm.
Definition: apm32f4xx_crypto_cipher.c:663
error_t des3Init(Des3Context *context, const uint8_t *key, size_t keyLen)
Initialize a Triple DES context using the supplied key.
Definition: apm32f4xx_crypto_cipher.c:310
void desProcessData(DesContext *context, uint8_t *iv, const uint8_t *input, uint8_t *output, size_t length, uint32_t mode)
Perform DES encryption or decryption.
Definition: apm32f4xx_crypto_cipher.c:75
#define CRYP_CTRL_ALGOMSEL_DES_CBC
Definition: apm32f4xx_crypto_cipher.h:60
Collection of AEAD algorithms.
void des3EncryptBlock(Des3Context *context, const uint8_t *input, uint8_t *output)
Encrypt a 8-byte block using Triple DES algorithm.
Definition: apm32f4xx_crypto_cipher.c:369
error_t cbcEncrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CBC encryption.
Definition: apm32f4xx_crypto_cipher.c:924
error_t ecbDecrypt(const CipherAlgo *cipher, void *context, const uint8_t *c, uint8_t *p, size_t length)
ECB decryption.
Definition: apm32f4xx_crypto_cipher.c:808
void aesDecryptBlock(AesContext *context, const uint8_t *input, uint8_t *output)
Decrypt a 16-byte block using AES algorithm.
Definition: apm32f4xx_crypto_cipher.c:678
void des3ProcessData(Des3Context *context, uint8_t *iv, const uint8_t *input, uint8_t *output, size_t length, uint32_t mode)
Perform Triple DES encryption or decryption.
Definition: apm32f4xx_crypto_cipher.c:221
General definitions for cryptographic algorithms.
#define CRYP_CTRL_ALGOMSEL_AES_CTR
Definition: apm32f4xx_crypto_cipher.h:63
APM32F4 cipher hardware accelerator.
Block cipher modes of operation.
error_t aesInit(AesContext *context, const uint8_t *key, size_t keyLen)
Key expansion.
Definition: apm32f4xx_crypto_cipher.c:612
void desDecryptBlock(DesContext *context, const uint8_t *input, uint8_t *output)
Decrypt a 8-byte block using DES algorithm.
Definition: apm32f4xx_crypto_cipher.c:201
#define CRYP_CTRL_ALGOMSEL_TDES_CBC
Definition: apm32f4xx_crypto_cipher.h:58
error_t ecbEncrypt(const CipherAlgo *cipher, void *context, const uint8_t *p, uint8_t *c, size_t length)
ECB encryption.
Definition: apm32f4xx_crypto_cipher.c:698
#define CRYP_CTRL_ALGOMSEL_DES_ECB
Definition: apm32f4xx_crypto_cipher.h:59
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: apm32f4xx_crypto_cipher.c:459
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
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: apm32f4xx_crypto_cipher.c:1179
#define CRYP_CTRL_ALGOMSEL_TDES_ECB
Definition: apm32f4xx_crypto_cipher.h:57
#define CRYP_CTRL_ALGOMSEL_AES_CBC
Definition: apm32f4xx_crypto_cipher.h:62
void des3DecryptBlock(Des3Context *context, const uint8_t *input, uint8_t *output)
Decrypt a 8-byte block using Triple DES algorithm.
Definition: apm32f4xx_crypto_cipher.c:384
error_t cbcDecrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CBC decryption.
Definition: apm32f4xx_crypto_cipher.c:1047
void desEncryptBlock(DesContext *context, const uint8_t *input, uint8_t *output)
Encrypt a 8-byte block using DES algorithm.
Definition: apm32f4xx_crypto_cipher.c:186
void ctrIncBlock(uint8_t *ctr, uint32_t inc, size_t blockSize, size_t m)
Increment counter block.
Definition: ctr.c:138
APM32F4 hardware cryptographic accelerator.
Debugging facilities.