diff options
author | vnugent <public@vaughnnugent.com> | 2024-06-11 15:59:47 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-06-11 15:59:47 -0400 |
commit | ffe5d91502efc2cbf98182b7edb97ef4422f26a6 (patch) | |
tree | 4883bfaa4624cd12b910d105009e889935f25978 /src/nc-crypto.h | |
parent | 5e32450ccf9186e86a7596a7d774621cf81c62ff (diff) | |
parent | 461dd71069d0c0250752ac1256160605c33a6243 (diff) |
Merge branch 'develop' into c-sharp
Diffstat (limited to 'src/nc-crypto.h')
-rw-r--r-- | src/nc-crypto.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nc-crypto.h b/src/nc-crypto.h index f04ebe0..11da6d3 100644 --- a/src/nc-crypto.h +++ b/src/nc-crypto.h @@ -29,6 +29,8 @@ #define CHACHA_NONCE_SIZE 0x0cu /* Size of 12 is set by the cipher spec */ #define CHACHA_KEY_SIZE 0x20u /* Size of 32 is set by the cipher spec */ #define SHA256_DIGEST_SIZE 0x20u /* Size of 32 is set by the cipher spec */ +#define AES_IV_SIZE 0x10u /* CBC IV size matches the AES block size of 128 */ +#define AES_KEY_SIZE 0x20u /* AES 256 key size */ typedef uint8_t cstatus_t; #define CSTATUS_OK ((cstatus_t)0x01u) @@ -56,4 +58,12 @@ cstatus_t ncCryptoChacha20( uint32_t dataSize ); +cstatus_t ncAes256CBCEncrypt( + const uint8_t key[32], + const uint8_t iv[16], + const uint8_t* input, + uint8_t* output, + uint32_t dataSize +); + #endif /* !_NC_CRYPTO_H */ |