Skip to content

Commit

Permalink
update after upstream merge
Browse files Browse the repository at this point in the history
Signed-off-by: Basil Hess <[email protected]>
  • Loading branch information
bhess committed May 12, 2024
1 parent 9b14b3d commit b27cffd
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 232 deletions.
2 changes: 1 addition & 1 deletion docs/algorithms/sig/mayo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **Authors' website**: https://pqmayo.org
- **Specification version**: https://eprint.iacr.org/2023/1683.
- **Primary Source**<a name="primary-source"></a>:
- **Source**: https://github.com/PQCMayo/MAYO-C/commit/933e58d62773d80477506f7fcfdbc8574db3f5ad with copy_from_upstream patches
- **Source**: https://github.com/PQCMayo/MAYO-C/commit/fc9079fb5ac5cd4af98e3e0f094a0a3cf2a01499 with copy_from_upstream patches
- **Implementation license (SPDX-Identifier)**: Apache-2.0


Expand Down
2 changes: 1 addition & 1 deletion docs/algorithms/sig/mayo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ website: https://pqmayo.org
nist-round: 1
spec-version: https://eprint.iacr.org/2023/1683
primary-upstream:
source: https://github.com/PQCMayo/MAYO-C/commit/933e58d62773d80477506f7fcfdbc8574db3f5ad
source: https://github.com/PQCMayo/MAYO-C/commit/fc9079fb5ac5cd4af98e3e0f094a0a3cf2a01499
with copy_from_upstream patches
spdx-license-identifier: Apache-2.0
parameter-sets:
Expand Down
4 changes: 2 additions & 2 deletions scripts/copy_from_upstream/copy_from_upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ upstreams:
-
name: pqmayo
git_url: https://github.com/PQCMayo/MAYO-C.git
git_branch: bhe-liboqs-integration
git_commit: 933e58d62773d80477506f7fcfdbc8574db3f5ad
git_branch: nibbling-mayo
git_commit: fc9079fb5ac5cd4af98e3e0f094a0a3cf2a01499
sig_meta_path: 'META/{pretty_name_full}_META.yml'
sig_scheme_path: '.'
patches: [pqmayo-aes.patch, pqmayo-mem.patch]
Expand Down
23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_1_avx2/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

15 changes: 0 additions & 15 deletions src/sig/mayo/pqmayo_mayo_1_avx2/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 <stddef.h>

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 */

23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_1_opt/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

15 changes: 0 additions & 15 deletions src/sig/mayo/pqmayo_mayo_1_opt/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 <stddef.h>

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 */

23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_2_avx2/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

16 changes: 0 additions & 16 deletions src/sig/mayo/pqmayo_mayo_2_avx2/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 <stddef.h>

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 */

23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_2_opt/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

16 changes: 0 additions & 16 deletions src/sig/mayo/pqmayo_mayo_2_opt/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 <stddef.h>

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 */

23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_3_avx2/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

14 changes: 0 additions & 14 deletions src/sig/mayo/pqmayo_mayo_3_avx2/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 <stddef.h>

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 */

23 changes: 0 additions & 23 deletions src/sig/mayo/pqmayo_mayo_3_opt/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Loading

0 comments on commit b27cffd

Please sign in to comment.