From 268d61395ff01b0eeb6eba1d4c484f6531ec07ca Mon Sep 17 00:00:00 2001 From: Basil Hess Date: Sun, 12 May 2024 09:50:44 +0200 Subject: [PATCH] remove PQM4 defines from api --- src/mayo_1/api.c | 23 ----------------------- src/mayo_1/api.h | 15 --------------- src/mayo_2/api.c | 23 ----------------------- src/mayo_2/api.h | 16 ---------------- src/mayo_3/api.c | 23 ----------------------- src/mayo_3/api.h | 14 -------------- src/mayo_5/api.c | 23 ----------------------- src/mayo_5/api.h | 15 --------------- 8 files changed, 152 deletions(-) diff --git a/src/mayo_1/api.c b/src/mayo_1/api.c index a7bb712..b7e2ef8 100644 --- a/src/mayo_1/api.c +++ b/src/mayo_1/api.c @@ -14,7 +14,6 @@ crypto_sign_keypair(unsigned char *pk, unsigned char *sk) { return mayo_keypair(MAYO_PARAMS, pk, sk); } -#ifndef PQM4 int crypto_sign(unsigned char *sm, size_t *smlen, const unsigned char *m, size_t mlen, @@ -44,26 +43,4 @@ crypto_sign_verify(const unsigned char *sig, size_t siglen, return -1; return mayo_verify(MAYO_PARAMS, m, mlen, sig, pk); } -#else -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk) { - - size_t smlen_ll; - int rc = mayo_sign(MAYO_PARAMS, sm, &smlen_ll, m, mlen, sk); - *smlen = smlen_ll; - return rc; -} - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk) { - size_t mlen_ll; - int rc = mayo_open(MAYO_PARAMS, m, &mlen_ll, sm, smlen, pk); - *mlen = mlen_ll; - return rc; -} -#endif diff --git a/src/mayo_1/api.h b/src/mayo_1/api.h index 1c23884..07a2f67 100644 --- a/src/mayo_1/api.h +++ b/src/mayo_1/api.h @@ -15,8 +15,6 @@ int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); - -#ifndef PQM4 #define crypto_sign MAYO_NAMESPACE(crypto_sign) int crypto_sign(unsigned char *sm, size_t *smlen, @@ -40,19 +38,6 @@ int crypto_sign_verify(const unsigned char *sig, size_t siglen, const unsigned char *m, size_t mlen, const unsigned char *pk); -#else -#include - -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk); - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk); -#endif #endif /* api_h */ diff --git a/src/mayo_2/api.c b/src/mayo_2/api.c index e4b5604..a7cf85e 100644 --- a/src/mayo_2/api.c +++ b/src/mayo_2/api.c @@ -14,7 +14,6 @@ crypto_sign_keypair(unsigned char *pk, unsigned char *sk) { return mayo_keypair(MAYO_PARAMS, pk, sk); } -#ifndef PQM4 int crypto_sign(unsigned char *sm, size_t *smlen, const unsigned char *m, size_t mlen, @@ -44,26 +43,4 @@ crypto_sign_verify(const unsigned char *sig, size_t siglen, return -1; return mayo_verify(MAYO_PARAMS, m, mlen, sig, pk); } -#else -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk) { - - size_t smlen_ll; - int rc = mayo_sign(MAYO_PARAMS, sm, &smlen_ll, m, mlen, sk); - *smlen = smlen_ll; - return rc; -} - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk) { - size_t mlen_ll; - int rc = mayo_open(MAYO_PARAMS, m, &mlen_ll, sm, smlen, pk); - *mlen = mlen_ll; - return rc; -} -#endif diff --git a/src/mayo_2/api.h b/src/mayo_2/api.h index b972e12..7c38c1a 100644 --- a/src/mayo_2/api.h +++ b/src/mayo_2/api.h @@ -15,8 +15,6 @@ int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); - -#ifndef PQM4 #define crypto_sign MAYO_NAMESPACE(crypto_sign) int crypto_sign(unsigned char *sm, size_t *smlen, @@ -40,20 +38,6 @@ int crypto_sign_verify(const unsigned char *sig, size_t siglen, const unsigned char *m, size_t mlen, const unsigned char *pk); -#else -#include - -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk); - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk); -#endif - #endif /* api_h */ diff --git a/src/mayo_3/api.c b/src/mayo_3/api.c index 79101e4..5c42eab 100644 --- a/src/mayo_3/api.c +++ b/src/mayo_3/api.c @@ -14,7 +14,6 @@ crypto_sign_keypair(unsigned char *pk, unsigned char *sk) { return mayo_keypair(MAYO_PARAMS, pk, sk); } -#ifndef PQM4 int crypto_sign(unsigned char *sm, size_t *smlen, const unsigned char *m, size_t mlen, @@ -44,26 +43,4 @@ crypto_sign_verify(const unsigned char *sig, size_t siglen, return -1; return mayo_verify(MAYO_PARAMS, m, mlen, sig, pk); } -#else -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk) { - - size_t smlen_ll; - int rc = mayo_sign(MAYO_PARAMS, sm, &smlen_ll, m, mlen, sk); - *smlen = smlen_ll; - return rc; -} - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk) { - size_t mlen_ll; - int rc = mayo_open(MAYO_PARAMS, m, &mlen_ll, sm, smlen, pk); - *mlen = mlen_ll; - return rc; -} -#endif diff --git a/src/mayo_3/api.h b/src/mayo_3/api.h index c22bade..47899c1 100644 --- a/src/mayo_3/api.h +++ b/src/mayo_3/api.h @@ -15,8 +15,6 @@ int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); - -#ifndef PQM4 #define crypto_sign MAYO_NAMESPACE(crypto_sign) int crypto_sign(unsigned char *sm, size_t *smlen, @@ -40,18 +38,6 @@ int crypto_sign_verify(const unsigned char *sig, size_t siglen, const unsigned char *m, size_t mlen, const unsigned char *pk); -#else -#include - -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk); -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk); -#endif #endif /* api_h */ diff --git a/src/mayo_5/api.c b/src/mayo_5/api.c index 73bebf2..f2e861e 100644 --- a/src/mayo_5/api.c +++ b/src/mayo_5/api.c @@ -14,7 +14,6 @@ crypto_sign_keypair(unsigned char *pk, unsigned char *sk) { return mayo_keypair(MAYO_PARAMS, pk, sk); } -#ifndef PQM4 int crypto_sign(unsigned char *sm, size_t *smlen, const unsigned char *m, size_t mlen, @@ -44,26 +43,4 @@ crypto_sign_verify(const unsigned char *sig, size_t siglen, return -1; return mayo_verify(MAYO_PARAMS, m, mlen, sig, pk); } -#else -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk) { - - size_t smlen_ll; - int rc = mayo_sign(MAYO_PARAMS, sm, &smlen_ll, m, mlen, sk); - *smlen = smlen_ll; - return rc; -} - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk) { - size_t mlen_ll; - int rc = mayo_open(MAYO_PARAMS, m, &mlen_ll, sm, smlen, pk); - *mlen = mlen_ll; - return rc; -} -#endif diff --git a/src/mayo_5/api.h b/src/mayo_5/api.h index 5763e36..fa1ebbb 100644 --- a/src/mayo_5/api.h +++ b/src/mayo_5/api.h @@ -15,8 +15,6 @@ int crypto_sign_keypair(unsigned char *pk, unsigned char *sk); - -#ifndef PQM4 #define crypto_sign MAYO_NAMESPACE(crypto_sign) int crypto_sign(unsigned char *sm, size_t *smlen, @@ -40,19 +38,6 @@ int crypto_sign_verify(const unsigned char *sig, size_t siglen, const unsigned char *m, size_t mlen, const unsigned char *pk); -#else -#include - -int -crypto_sign(unsigned char *sm, size_t *smlen, - const unsigned char *m, size_t mlen, - const unsigned char *sk); - -int -crypto_sign_open(unsigned char *m, size_t *mlen, - const unsigned char *sm, size_t smlen, - const unsigned char *pk); -#endif #endif /* api_h */