nrfxlib API 2.7.99
Loading...
Searching...
No Matches
AES-CBC-PKCS7 - AES Cipher Block Chaining with PKCS7

Type definitions and APIs for AES-CBC-PKCS7 (AES Cipher Block Chaining with PKCS7 padding). More...

Functions

void ocrypto_aes_cbc_pkcs_encrypt (uint8_t *ct, const uint8_t *pt, size_t pt_len, const uint8_t *key, size_t size, const uint8_t iv[16])
 
int ocrypto_aes_cbc_pkcs_decrypt (uint8_t *pt, size_t *pt_len, const uint8_t *ct, size_t ct_len, const uint8_t *key, size_t size, const uint8_t iv[16])
 

Incremental AES-CBC encryption/decryption.

This group of functions can be used to incrementally compute the AES-CBC encryption/decryption for a given message.

void ocrypto_aes_cbc_pkcs_init (ocrypto_aes_cbc_pkcs_ctx *ctx, const uint8_t *key, size_t size, const uint8_t iv[16], int decrypt)
 
size_t ocrypto_aes_cbc_pkcs_output_size (ocrypto_aes_cbc_pkcs_ctx *ctx, size_t pt_len)
 
void ocrypto_aes_cbc_pkcs_update (ocrypto_aes_cbc_pkcs_ctx *ctx, uint8_t *out, const uint8_t *in, size_t in_len)
 
void ocrypto_aes_cbc_pkcs_final_enc (ocrypto_aes_cbc_pkcs_ctx *ctx, uint8_t ct[16])
 
int ocrypto_aes_cbc_pkcs_final_dec (ocrypto_aes_cbc_pkcs_ctx *ctx, uint8_t *pt, size_t *pt_len)
 

Detailed Description

Type definitions and APIs for AES-CBC-PKCS7 (AES Cipher Block Chaining with PKCS7 padding).

AES-CBC (AES Cipher Block Chaining) is an AES block cipher mode which avoids the problems of the ECB mode by xoring each plaintext block with the previous ciphertext block before being encrypted. PKCS7 padding allows encoding/decoding of arbitrarily sized messages.