Basil Hess fa5f792906
Update MAYO to NIST round 2 (#2095)
* Update MAYO to NIST round 2 [full tests] [extended tests] [trigger downstream]

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

* Update mayo yml with neon

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>

---------

Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
2025-03-07 18:31:41 +01:00

22 lines
799 B
Diff

diff --git a/src/common/aes_ctr.h b/src/common/aes_ctr.h
index fdec519..8d2f429 100644
--- a/src/common/aes_ctr.h
+++ b/src/common/aes_ctr.h
@@ -23,8 +23,14 @@ int AES_128_CTR_4R_NI(unsigned char *output, size_t outputByteLen,
const unsigned char *input, size_t inputByteLen);
#define AES_128_CTR AES_128_CTR_NEON
#else
-int AES_128_CTR(unsigned char *output, size_t outputByteLen,
- const unsigned char *input, size_t inputByteLen);
+#include <aes.h>
+static inline int AES_128_CTR(unsigned char *output, size_t outputByteLen,
+ const unsigned char *input, size_t inputByteLen) {
+ (void) inputByteLen;
+ uint8_t iv[12] = { 0 };
+ aes128ctr_prf(output, outputByteLen, input, iv);
+ return (int) outputByteLen;
+}
#endif
#endif