aboutsummaryrefslogtreecommitdiff
path: root/aezref/aezv5/ref/crypto_aead.h
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2025-04-17 12:56:44 +0200
committerDaniel Schadt <kingdread@gmx.de>2025-04-17 12:56:44 +0200
commit9287a6cdc37c7c37e744f8418a13a74bb0e629ef (patch)
treef4d349e0d4ece886fda31f755b08163485a7a02e /aezref/aezv5/ref/crypto_aead.h
parent66814768f8c172d6996d037064924c908245a951 (diff)
downloadzears-9287a6cdc37c7c37e744f8418a13a74bb0e629ef.tar.gz
zears-9287a6cdc37c7c37e744f8418a13a74bb0e629ef.tar.bz2
zears-9287a6cdc37c7c37e744f8418a13a74bb0e629ef.zip
fuzz against slow aez-ref, not fast aez-ni
Two reasons: First, this allows us to test more of the algorithm, as the (slow) reference implementation supports multiple associated data items, large values for tau, ... Second, this avoids the segfault crash, which is a limit of the fast implementation (the assumption there is that data is aligned properly, and even a read out-of-bounds will not cause a segfault).
Diffstat (limited to 'aezref/aezv5/ref/crypto_aead.h')
-rw-r--r--aezref/aezv5/ref/crypto_aead.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/aezref/aezv5/ref/crypto_aead.h b/aezref/aezv5/ref/crypto_aead.h
new file mode 100644
index 0000000..4d9b0e2
--- /dev/null
+++ b/aezref/aezv5/ref/crypto_aead.h
@@ -0,0 +1,17 @@
+int crypto_aead_encrypt(
+ unsigned char *c,unsigned long long *clen,
+ const unsigned char *m,unsigned long long mlen,
+ const unsigned char *ad,unsigned long long adlen,
+ const unsigned char *nsec,
+ const unsigned char *npub,
+ const unsigned char *k
+);
+
+int crypto_aead_decrypt(
+ unsigned char *m,unsigned long long *mlen,
+ unsigned char *nsec,
+ const unsigned char *c,unsigned long long clen,
+ const unsigned char *ad,unsigned long long adlen,
+ const unsigned char *npub,
+ const unsigned char *k
+);