summaryrefslogtreecommitdiff
path: root/crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto.h')
-rw-r--r--crypto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto.h b/crypto.h
index 5e3af32..dc14585 100644
--- a/crypto.h
+++ b/crypto.h
@@ -19,6 +19,10 @@
#define crypto_box_sec_key_size crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES
#define NONCE_LENGTH (sizeof(struct taia))
+#define NONCE_RND_LENGTH (crypto_box_boxzerobytes - NONCE_LENGTH)
+#define NONCE_ALL_LENGTH (crypto_box_boxzerobytes + NONCE_LENGTH)
#define NONCE_OFFSET (crypto_box_noncebytes - NONCE_LENGTH)
+#define NONCE_EDN_OFFSET(x) ((x) + NONCE_OFFSET)
+#define NONCE_PKT_OFFSET(x) ((x) + NONCE_RND_LENGTH)
#endif /* CRYPTO_H */