diff options
author | vnugent <public@vaughnnugent.com> | 2024-06-11 15:44:28 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-06-11 15:44:28 -0400 |
commit | 461dd71069d0c0250752ac1256160605c33a6243 (patch) | |
tree | e854475ff9476c96a8257af0373c0bb064eeced8 /src/nc-crypto.h | |
parent | a74f96251bcc81fb2c94fe75dd6f8043fd35fe0b (diff) |
feat!: #4 Close #4. Add public nip04 support to api
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 */ |