apm32f4xx_crypto_cipher.c
Go to the documentation of this file.
APM32F4 hardware cryptographic accelerator.
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
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 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
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
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
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 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 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 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 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 aesEncryptBlock(AesContext *context, const uint8_t *input, uint8_t *output)
Encrypt a 16-byte block using AES algorithm.
Definition: apm32f4xx_crypto_cipher.c:663
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
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
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
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
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
APM32F4 cipher hardware accelerator.
#define CRYP_CTRL_ALGOMSEL_DES_CBC
Definition: apm32f4xx_crypto_cipher.h:60
#define CRYP_CTRL_ALGOMSEL_AES_ECB
Definition: apm32f4xx_crypto_cipher.h:61
#define CRYP_CTRL_ALGOMSEL_DES_ECB
Definition: apm32f4xx_crypto_cipher.h:59
#define CRYP_CTRL_ALGOMSEL_AES_CTR
Definition: apm32f4xx_crypto_cipher.h:63
#define CRYP_CTRL_ALGOMSEL_TDES_CBC
Definition: apm32f4xx_crypto_cipher.h:58
#define CRYP_CTRL_ALGOMSEL_AES_CBC
Definition: apm32f4xx_crypto_cipher.h:62
#define CRYP_CTRL_ALGOMSEL_AES_KEY
Definition: apm32f4xx_crypto_cipher.h:64
#define CRYP_CTRL_ALGOMSEL_TDES_ECB
Definition: apm32f4xx_crypto_cipher.h:57
Collection of AEAD algorithms.
Block cipher modes of operation.
General definitions for cryptographic algorithms.
Debugging facilities.
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:388
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:400