Skip to content

Commit

Permalink
Algorithm strings with dashes instead of underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
bhess committed Jul 11, 2024
1 parent fc9079f commit 8d8c1d7
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 44 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,21 @@ jobs:
rm -rf build
cmake -Bbuild -DENABLE_CT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DMAYO_MARCH="-march=haswell -maes"
cmake --build build
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_1
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_2
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_3
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_5
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-1
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-2
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-3
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-5
if: matrix.mayo_build_type == 'ref'

- name: Memcheck
run: |
rm -rf build
cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DMAYO_MARCH="-march=haswell -maes"
cmake --build build
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_1
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_2
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_3
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO_5
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-1
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-2
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-3
valgrind --error-exitcode=1 --track-origins=yes build/test/mayo_test_scheme MAYO-5
if: matrix.mayo_build_type == 'ref'

- name: Memcheck
Expand All @@ -136,25 +136,25 @@ jobs:
rm -rf build
cmake -Bbuild -DCMAKE_BUILD_TYPE=ASAN -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DCMAKE_C_COMPILER=clang
cmake --build build
ctest -v --test-dir build
ctest -V --test-dir build
- name: Memory Sanitizer MSAN
run: |
rm -rf build
cmake -Bbuild -DCMAKE_BUILD_TYPE=MSAN -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DCMAKE_C_COMPILER=clang
cmake --build build
ctest -v --test-dir build
ctest -V --test-dir build
- name: Leak Sanitizer LSAN
run: |
rm -rf build
cmake -Bbuild -DCMAKE_BUILD_TYPE=LSAN -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DCMAKE_C_COMPILER=clang
cmake --build build
ctest -v --test-dir build
ctest -V --test-dir build
- name: Undefined Behavior Sanitizer UBSAN
run: |
rm -rf build
cmake -Bbuild -DCMAKE_BUILD_TYPE=UBSAN -DMAYO_BUILD_TYPE=${{ matrix.mayo_build_type }} -DCMAKE_C_COMPILER=clang
cmake --build build
ctest -v --test-dir build
ctest -V --test-dir build
2 changes: 1 addition & 1 deletion META/MAYO_1_META.yml → META/MAYO-1_META.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MAYO_1
name: MAYO-1
type: signature
claimed-nist-level: 1
length-public-key: 1168
Expand Down
2 changes: 1 addition & 1 deletion META/MAYO_2_META.yml → META/MAYO-2_META.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MAYO_2
name: MAYO-2
type: signature
claimed-nist-level: 1
length-public-key: 5488
Expand Down
2 changes: 1 addition & 1 deletion META/MAYO_3_META.yml → META/MAYO-3_META.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MAYO_3
name: MAYO-3
type: signature
claimed-nist-level: 3
length-public-key: 2656
Expand Down
2 changes: 1 addition & 1 deletion META/MAYO_5_META.yml → META/MAYO-5_META.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MAYO_5
name: MAYO-5
type: signature
claimed-nist-level: 5
length-public-key: 5008
Expand Down
2 changes: 1 addition & 1 deletion src/mayo_1/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CRYPTO_PUBLICKEYBYTES 1168
#define CRYPTO_BYTES 321

#define CRYPTO_ALGNAME "MAYO_1"
#define CRYPTO_ALGNAME "MAYO-1"

#define crypto_sign_keypair MAYO_NAMESPACE(crypto_sign_keypair)
int
Expand Down
2 changes: 1 addition & 1 deletion src/mayo_2/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CRYPTO_PUBLICKEYBYTES 5488
#define CRYPTO_BYTES 180

#define CRYPTO_ALGNAME "MAYO_2"
#define CRYPTO_ALGNAME "MAYO-2"

#define crypto_sign_keypair MAYO_NAMESPACE(crypto_sign_keypair)
int
Expand Down
2 changes: 1 addition & 1 deletion src/mayo_3/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CRYPTO_PUBLICKEYBYTES 2656
#define CRYPTO_BYTES 577

#define CRYPTO_ALGNAME "MAYO_3"
#define CRYPTO_ALGNAME "MAYO-3"

#define crypto_sign_keypair MAYO_NAMESPACE(crypto_sign_keypair)
int
Expand Down
2 changes: 1 addition & 1 deletion src/mayo_5/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CRYPTO_PUBLICKEYBYTES 5008
#define CRYPTO_BYTES 838

#define CRYPTO_ALGNAME "MAYO_5"
#define CRYPTO_ALGNAME "MAYO-5"

#define crypto_sign_keypair MAYO_NAMESPACE(crypto_sign_keypair)
int
Expand Down
16 changes: 8 additions & 8 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ if (ENABLE_PARAMS_DYNAMIC)
target_link_libraries(mayo_test_scheme mayo)
target_include_directories(mayo_test_scheme PUBLIC ../src/common)

add_test(MAYO_1_KAT mayo_test_kat MAYO_1)
add_test(MAYO_2_KAT mayo_test_kat MAYO_2)
add_test(MAYO_3_KAT mayo_test_kat MAYO_3)
add_test(MAYO_5_KAT mayo_test_kat MAYO_5)
add_test(MAYO_1_SELFTEST mayo_test_scheme MAYO_1)
add_test(MAYO_2_SELFTEST mayo_test_scheme MAYO_2)
add_test(MAYO_3_SELFTEST mayo_test_scheme MAYO_3)
add_test(MAYO_5_SELFTEST mayo_test_scheme MAYO_5)
add_test(MAYO_1_KAT mayo_test_kat MAYO-1)
add_test(MAYO_2_KAT mayo_test_kat MAYO-2)
add_test(MAYO_3_KAT mayo_test_kat MAYO-3)
add_test(MAYO_5_KAT mayo_test_kat MAYO-5)
add_test(MAYO_1_SELFTEST mayo_test_scheme MAYO-1)
add_test(MAYO_2_SELFTEST mayo_test_scheme MAYO-2)
add_test(MAYO_3_SELFTEST mayo_test_scheme MAYO-3)
add_test(MAYO_5_SELFTEST mayo_test_scheme MAYO-5)
else()
FOREACH(MVARIANT ${MVARIANT_S})
string(TOLOWER ${MVARIANT} MVARIANT_LOWER)
Expand Down
8 changes: 4 additions & 4 deletions test/bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ int main(int argc, char *argv[]) {
goto end;
}
int runs = atoi(argv[2]);
if (!strcmp(argv[1], "MAYO_1")) {
if (!strcmp(argv[1], "MAYO-1")) {
rc = bench_sig(&MAYO_1, runs, 0);
} else if (!strcmp(argv[1], "MAYO_2")) {
} else if (!strcmp(argv[1], "MAYO-2")) {
rc = bench_sig(&MAYO_2, runs, 0);
} else if (!strcmp(argv[1], "MAYO_3")) {
} else if (!strcmp(argv[1], "MAYO-3")) {
rc = bench_sig(&MAYO_3, runs, 0);
} else if (!strcmp(argv[1], "MAYO_5")) {
} else if (!strcmp(argv[1], "MAYO-5")) {
rc = bench_sig(&MAYO_5, runs, 0);
}
#else
Expand Down
8 changes: 4 additions & 4 deletions test/bench_mayo_table3.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ int main(int argc, char *argv[]) {
goto end;
}
int runs = atoi(argv[2]);
if (!strcmp(argv[1], "MAYO_1")) {
if (!strcmp(argv[1], "MAYO-1")) {
rc = bench_sig(&MAYO_1, runs, 0);
} else if (!strcmp(argv[1], "MAYO_2")) {
} else if (!strcmp(argv[1], "MAYO-2")) {
rc = bench_sig(&MAYO_2, runs, 0);
} else if (!strcmp(argv[1], "MAYO_3")) {
} else if (!strcmp(argv[1], "MAYO-3")) {
rc = bench_sig(&MAYO_3, runs, 0);
} else if (!strcmp(argv[1], "MAYO_5")) {
} else if (!strcmp(argv[1], "MAYO-5")) {
rc = bench_sig(&MAYO_5, runs, 0);
}
#else
Expand Down
8 changes: 4 additions & 4 deletions test/test_kat.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ int main(int argc, char *argv[]) {
goto end;
}

if (!strcmp(argv[1], "MAYO_1")) {
if (!strcmp(argv[1], "MAYO-1")) {
rc = test_sig_kat(&MAYO_1);
} else if (!strcmp(argv[1], "MAYO_2")) {
} else if (!strcmp(argv[1], "MAYO-2")) {
rc = test_sig_kat(&MAYO_2);
} else if (!strcmp(argv[1], "MAYO_3")) {
} else if (!strcmp(argv[1], "MAYO-3")) {
rc = test_sig_kat(&MAYO_3);
} else if (!strcmp(argv[1], "MAYO_5")) {
} else if (!strcmp(argv[1], "MAYO-5")) {
rc = test_sig_kat(&MAYO_5);
} else {
return -1;
Expand Down
8 changes: 4 additions & 4 deletions test/test_mayo.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ int main(int argc, char *argv[]) {
int rc = 0;

#ifdef ENABLE_PARAMS_DYNAMIC
if (!strcmp(argv[1], "MAYO_1")) {
if (!strcmp(argv[1], "MAYO-1")) {
rc = test_mayo(&MAYO_1);
} else if (!strcmp(argv[1], "MAYO_2")) {
} else if (!strcmp(argv[1], "MAYO-2")) {
rc = test_mayo(&MAYO_2);
} else if (!strcmp(argv[1], "MAYO_3")) {
} else if (!strcmp(argv[1], "MAYO-3")) {
rc = test_mayo(&MAYO_3);
} else if (!strcmp(argv[1], "MAYO_5")) {
} else if (!strcmp(argv[1], "MAYO-5")) {
rc = test_mayo(&MAYO_5);
}
#else
Expand Down

0 comments on commit 8d8c1d7

Please sign in to comment.