aboutsummaryrefslogtreecommitdiff
path: root/src/noscrypt.h
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-02-07 01:37:53 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-02-07 01:37:53 -0500
commitaa5113741bb419b02d6ea416bba571fa3d65db46 (patch)
treeac5f22ae7472e1f284eefda7bcd6613d18c822fa /src/noscrypt.h
parent55f47d22cc9ce4d1e22b70814d608c7ef3b1bbc9 (diff)
add missing hmac-key output buffer
Diffstat (limited to 'src/noscrypt.h')
-rw-r--r--src/noscrypt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/noscrypt.h b/src/noscrypt.h
index f6bfe76..387d856 100644
--- a/src/noscrypt.h
+++ b/src/noscrypt.h
@@ -72,6 +72,7 @@
#define NC_PUBKEY_SIZE 32
#define NC_SHARED_SEC_SIZE 32
#define NC_CONV_KEY_SIZE 32
+#define NC_HMAC_KEY_SIZE 32
#define NC_MESSAGE_KEY_SIZE NIP44_MESSAGE_KEY_SIZE
/*
@@ -80,8 +81,6 @@
*/
#define NIP44_MIN_ENC_MESSAGE_SIZE 1
#define NIP44_MAX_ENC_MESSAGE_SIZE 65535
-#define NIP44_MIN_DEC_MESSAGE_SIZE 99
-#define NIP44_MAX_DEC_MESSAGE_SIZE 65603
/*
* The Nip44 constant salt
@@ -377,6 +376,7 @@ NC_EXPORT NCResult NC_CC NCEncrypt(
const NCContext* ctx,
const NCSecretKey* sk,
const NCPublicKey* pk,
+ uint8_t hmacKeyOut[NC_HMAC_KEY_SIZE],
NCCryptoData* args
);
@@ -462,6 +462,7 @@ the error code and positional argument that caused the error.
NC_EXPORT NCResult NC_CC NCEncryptEx(
const NCContext* ctx,
const uint8_t conversationKey[NC_CONV_KEY_SIZE],
+ uint8_t hmacKeyOut[NC_HMAC_KEY_SIZE],
NCCryptoData* args
);