My Project
Loading...
Searching...
No Matches
aes.h
1
31WOLFSSL_API int wc_AesSetKey(Aes* aes, const byte* key, word32 len,
32 const byte* iv, int dir);
33
61WOLFSSL_API int wc_AesSetIV(Aes* aes, const byte* iv);
62
103WOLFSSL_API int wc_AesCbcEncrypt(Aes* aes, byte* out,
104 const byte* in, word32 sz);
105
146WOLFSSL_API int wc_AesCbcDecrypt(Aes* aes, byte* out,
147 const byte* in, word32 sz);
148
191WOLFSSL_API int wc_AesCtrEncrypt(Aes* aes, byte* out,
192 const byte* in, word32 sz);
193
222WOLFSSL_API void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in);
223
256WOLFSSL_API void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in);
257
296WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len,
297 const byte* iv, int dir);
298
326WOLFSSL_API int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len);
327
371WOLFSSL_API int wc_AesGcmEncrypt(Aes* aes, byte* out,
372 const byte* in, word32 sz,
373 const byte* iv, word32 ivSz,
374 byte* authTag, word32 authTagSz,
375 const byte* authIn, word32 authInSz);
376
420WOLFSSL_API int wc_AesGcmDecrypt(Aes* aes, byte* out,
421 const byte* in, word32 sz,
422 const byte* iv, word32 ivSz,
423 const byte* authTag, word32 authTagSz,
424 const byte* authIn, word32 authInSz);
425
447WOLFSSL_API int wc_GmacSetKey(Gmac* gmac, const byte* key, word32 len);
448
483WOLFSSL_API int wc_GmacUpdate(Gmac* gmac, const byte* iv, word32 ivSz,
484 const byte* authIn, word32 authInSz,
485 byte* authTag, word32 authTagSz);
486
510WOLFSSL_API int wc_AesCcmSetKey(Aes* aes, const byte* key, word32 keySz);
511
555WOLFSSL_API int wc_AesCcmEncrypt(Aes* aes, byte* out,
556 const byte* in, word32 inSz,
557 const byte* nonce, word32 nonceSz,
558 byte* authTag, word32 authTagSz,
559 const byte* authIn, word32 authInSz);
560
610WOLFSSL_API int wc_AesCcmDecrypt(Aes* aes, byte* out,
611 const byte* in, word32 inSz,
612 const byte* nonce, word32 nonceSz,
613 const byte* authTag, word32 authTagSz,
614 const byte* authIn, word32 authInSz);
615
648WOLFSSL_API int wc_AesXtsSetKey(XtsAes* aes, const byte* key,
649 word32 len, int dir, void* heap, int devId);
650
687WOLFSSL_API int wc_AesXtsEncryptSector(XtsAes* aes, byte* out,
688 const byte* in, word32 sz, word64 sector);
689
726WOLFSSL_API int wc_AesXtsDecryptSector(XtsAes* aes, byte* out,
727 const byte* in, word32 sz, word64 sector);
728
766WOLFSSL_API int wc_AesXtsEncrypt(XtsAes* aes, byte* out,
767 const byte* in, word32 sz, const byte* i, word32 iSz);
768
805WOLFSSL_API int wc_AesXtsDecrypt(XtsAes* aes, byte* out,
806 const byte* in, word32 sz, const byte* i, word32 iSz);
807
832WOLFSSL_API int wc_AesXtsFree(XtsAes* aes);
833
834
859WOLFSSL_API int wc_AesInit(Aes*, void*, int);
860
WOLFSSL_API int wc_AesCcmSetKey(Aes *aes, const byte *key, word32 keySz)
This function sets the key for an AES object using CCM (Counter with CBC-MAC). It takes a pointer to ...
Definition aes.c:6965
WOLFSSL_API int wc_AesInit(Aes *, void *, int)
Initialize Aes structure. Sets heap hint to be used and ID for use with async hardware.
Definition aes.c:7447
WOLFSSL_API int wc_AesCbcDecrypt(Aes *aes, byte *out, const byte *in, word32 sz)
Decrypts a cipher from the input buffer in, and places the resulting plain text in the output buffer ...
Definition aes.c:3008
WOLFSSL_API int wc_AesGcmDecrypt(Aes *aes, byte *out, const byte *in, word32 sz, const byte *iv, word32 ivSz, const byte *authTag, word32 authTagSz, const byte *authIn, word32 authInSz)
This function decrypts the input cipher text, held in the buffer in, and stores the resulting message...
Definition aes.c:6319
WOLFSSL_API int wc_AesGcmSetKey(Aes *aes, const byte *key, word32 len)
This function is used to set the key for AES GCM (Galois/Counter Mode). It initializes an AES object ...
Definition aes.c:4118
WOLFSSL_API int wc_AesCcmEncrypt(Aes *aes, byte *out, const byte *in, word32 inSz, const byte *nonce, word32 nonceSz, byte *authTag, word32 authTagSz, const byte *authIn, word32 authInSz)
This function encrypts the input message, in, into the output buffer, out, using CCM (Counter with CB...
Definition aes.c:6985
WOLFSSL_API int wc_AesSetIV(Aes *aes, const byte *iv)
This function sets the initialization vector for a particular AES object. The AES object should be in...
Definition aes.c:2840
WOLFSSL_API void wc_AesEncryptDirect(Aes *aes, byte *out, const byte *in)
This function is a one-block encrypt of the input block, in, into the output block,...
Definition aes.c:2860
WOLFSSL_API int wc_GmacSetKey(Gmac *gmac, const byte *key, word32 len)
This function initializes and sets the key for a GMAC object to be used for Galois Message Authentica...
Definition aes.c:6943
WOLFSSL_API int wc_AesCcmDecrypt(Aes *aes, byte *out, const byte *in, word32 inSz, const byte *nonce, word32 nonceSz, const byte *authTag, word32 authTagSz, const byte *authIn, word32 authInSz)
This function decrypts the input cipher text, in, into the output buffer, out, using CCM (Counter wit...
Definition aes.c:7013
WOLFSSL_API int wc_AesXtsEncryptSector(XtsAes *aes, byte *out, const byte *in, word32 sz, word64 sector)
Same process as wc_AesXtsEncrypt but uses a word64 type as the tweak value instead of a byte array....
Definition aes.c:8368
WOLFSSL_API int wc_AesGcmEncrypt(Aes *aes, byte *out, const byte *in, word32 sz, const byte *iv, word32 ivSz, byte *authTag, word32 authTagSz, const byte *authIn, word32 authInSz)
This function encrypts the input message, held in the buffer in, and stores the resulting cipher text...
Definition aes.c:5885
WOLFSSL_API int wc_AesXtsDecryptSector(XtsAes *aes, byte *out, const byte *in, word32 sz, word64 sector)
Same process as wc_AesXtsDecrypt but uses a word64 type as the tweak value instead of a byte array....
Definition aes.c:8396
WOLFSSL_API int wc_AesXtsEncrypt(XtsAes *aes, byte *out, const byte *in, word32 sz, const byte *i, word32 iSz)
AES with XTS mode. (XTS) XEX encryption with Tweak and cipher text Stealing.
Definition aes.c:8465
WOLFSSL_API void wc_AesDecryptDirect(Aes *aes, byte *out, const byte *in)
This function is a one-block decrypt of the input block, in, into the output block,...
Definition aes.c:2873
WOLFSSL_API int wc_AesXtsDecrypt(XtsAes *aes, byte *out, const byte *in, word32 sz, const byte *i, word32 iSz)
Same process as encryption but Aes key is AES_DECRYPTION type.
Definition aes.c:8573
WOLFSSL_API int wc_AesXtsSetKey(XtsAes *aes, const byte *key, word32 len, int dir, void *heap, int devId)
This is to help with setting keys to correct encrypt or decrypt type. It is up to user to call wc_Aes...
Definition aes.c:8304
WOLFSSL_API int wc_AesCtrEncrypt(Aes *aes, byte *out, const byte *in, word32 sz)
Encrypts/Decrypts a message from the input buffer in, and places the resulting cipher text in the out...
Definition aes.c:3859
WOLFSSL_API int wc_AesXtsFree(XtsAes *aes)
This is to free up any resources used by the XtsAes structure.
Definition aes.c:8345
WOLFSSL_API int wc_GmacUpdate(Gmac *gmac, const byte *iv, word32 ivSz, const byte *authIn, word32 authInSz, byte *authTag, word32 authTagSz)
This function generates the Gmac hash of the authIn input and stores the result in the authTag buffer...
Definition aes.c:6952
WOLFSSL_API int wc_AesSetKey(Aes *aes, const byte *key, word32 len, const byte *iv, int dir)
This function initializes an AES structure by setting the key and then setting the initialization vec...
Definition aes.c:2178
WOLFSSL_API int wc_AesCbcEncrypt(Aes *aes, byte *out, const byte *in, word32 sz)
Encrypts a plaintext message from the input buffer in, and places the resulting cipher text in the ou...
Definition aes.c:2951
WOLFSSL_API int wc_AesSetKeyDirect(Aes *aes, const byte *key, word32 len, const byte *iv, int dir)
This function is used to set the AES keys for CTR mode with AES. It initializes an AES object with th...
Definition aes.c:2208
Definition aes.h:149
Definition aes.h:246
Definition aes.h:239