ChibiOS/HAL  6.1.0
hal_crypto.c File Reference

Cryptographic Driver code. More...

#include "hal.h"

Go to the source code of this file.

Functions

void cryInit (void)
 Cryptographic Driver initialization. More...
 
void cryObjectInit (CRYDriver *cryp)
 Initializes the standard part of a CRYDriver structure. More...
 
void cryStart (CRYDriver *cryp, const CRYConfig *config)
 Configures and activates the cryptographic peripheral. More...
 
void cryStop (CRYDriver *cryp)
 Deactivates the cryptographic peripheral. More...
 
cryerror_t cryLoadTransientKey (CRYDriver *cryp, cryalgorithm_t algorithm, size_t size, const uint8_t *keyp)
 Initializes the transient key for a specific algorithm. More...
 
cryerror_t cryEncryptAES (CRYDriver *cryp, crykey_t key_id, const uint8_t *in, uint8_t *out)
 Encryption of a single block using AES. More...
 
cryerror_t cryDecryptAES (CRYDriver *cryp, crykey_t key_id, const uint8_t *in, uint8_t *out)
 Decryption of a single block using AES. More...
 
cryerror_t cryEncryptAES_ECB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out)
 Encryption operation using AES-ECB. More...
 
cryerror_t cryDecryptAES_ECB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out)
 Decryption operation using AES-ECB. More...
 
cryerror_t cryEncryptAES_CBC (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Encryption operation using AES-CBC. More...
 
cryerror_t cryDecryptAES_CBC (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Decryption operation using AES-CBC. More...
 
cryerror_t cryEncryptAES_CFB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Encryption operation using AES-CFB. More...
 
cryerror_t cryDecryptAES_CFB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Decryption operation using AES-CFB. More...
 
cryerror_t cryEncryptAES_CTR (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Encryption operation using AES-CTR. More...
 
cryerror_t cryDecryptAES_CTR (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Decryption operation using AES-CTR. More...
 
cryerror_t cryEncryptAES_GCM (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv, size_t aadsize, const uint8_t *aad, uint8_t *authtag)
 Encryption operation using AES-GCM. More...
 
cryerror_t cryDecryptAES_GCM (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv, size_t aadsize, const uint8_t *aad, uint8_t *authtag)
 Decryption operation using AES-GCM. More...
 
cryerror_t cryEncryptDES (CRYDriver *cryp, crykey_t key_id, const uint8_t *in, uint8_t *out)
 Encryption of a single block using (T)DES. More...
 
cryerror_t cryDecryptDES (CRYDriver *cryp, crykey_t key_id, const uint8_t *in, uint8_t *out)
 Decryption of a single block using (T)DES. More...
 
cryerror_t cryEncryptDES_ECB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out)
 Encryption operation using (T)DES-ECB. More...
 
cryerror_t cryDecryptDES_ECB (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out)
 Decryption operation using (T)DES-ECB. More...
 
cryerror_t cryEncryptDES_CBC (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Encryption operation using (T)DES-CBC. More...
 
cryerror_t cryDecryptDES_CBC (CRYDriver *cryp, crykey_t key_id, size_t size, const uint8_t *in, uint8_t *out, const uint8_t *iv)
 Decryption operation using (T)DES-CBC. More...
 
cryerror_t crySHA1Init (CRYDriver *cryp, SHA1Context *sha1ctxp)
 Hash initialization using SHA1. More...
 
cryerror_t crySHA1Update (CRYDriver *cryp, SHA1Context *sha1ctxp, size_t size, const uint8_t *in)
 Hash update using SHA1. More...
 
cryerror_t crySHA1Final (CRYDriver *cryp, SHA1Context *sha1ctxp, uint8_t *out)
 Hash finalization using SHA1. More...
 
cryerror_t crySHA256Init (CRYDriver *cryp, SHA256Context *sha256ctxp)
 Hash initialization using SHA256. More...
 
cryerror_t crySHA256Update (CRYDriver *cryp, SHA256Context *sha256ctxp, size_t size, const uint8_t *in)
 Hash update using SHA256. More...
 
cryerror_t crySHA256Final (CRYDriver *cryp, SHA256Context *sha256ctxp, uint8_t *out)
 Hash finalization using SHA256. More...
 
cryerror_t crySHA512Init (CRYDriver *cryp, SHA512Context *sha512ctxp)
 Hash initialization using SHA512. More...
 
cryerror_t crySHA512Update (CRYDriver *cryp, SHA512Context *sha512ctxp, size_t size, const uint8_t *in)
 Hash update using SHA512. More...
 
cryerror_t crySHA512Final (CRYDriver *cryp, SHA512Context *sha512ctxp, uint8_t *out)
 Hash finalization using SHA512. More...
 
cryerror_t cryTRNG (CRYDriver *cryp, uint8_t *out)
 True random numbers generator. More...
 

Detailed Description

Cryptographic Driver code.

Definition in file hal_crypto.c.