Skip to content

Commit

Permalink
Merge pull request wolfSSL#7713 from SparkiDev/dilithium_sign_small_a…
Browse files Browse the repository at this point in the history
…lloc

Dilithium: add implementation of signing that allocated less
JacobBarthelmeh authored Jul 5, 2024
2 parents 8946e3f + 44a5e1a commit ac52660
Showing 2 changed files with 1,094 additions and 394 deletions.
8 changes: 4 additions & 4 deletions wolfcrypt/benchmark/benchmark.c
Original file line number Diff line number Diff line change
@@ -1226,7 +1226,7 @@ static const char* bench_result_words1[][4] = {
defined(HAVE_CURVE25519) || defined(HAVE_CURVE25519_SHARED_SECRET) || \
defined(HAVE_ED25519) || defined(HAVE_CURVE448) || \
defined(HAVE_CURVE448_SHARED_SECRET) || defined(HAVE_ED448) || \
defined(WOLFSSL_HAVE_KYBER)
defined(WOLFSSL_HAVE_KYBER) || defined(HAVE_DILITHIUM)

static const char* bench_desc_words[][15] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */
@@ -1692,15 +1692,15 @@ static const char* bench_result_words3[][5] = {
defined(HAVE_CURVE448) || defined(HAVE_ED448) || \
defined(HAVE_ECC) || !defined(NO_DH) || \
!defined(NO_RSA) || defined(HAVE_SCRYPT) || \
defined(WOLFSSL_HAVE_KYBER)
defined(WOLFSSL_HAVE_KYBER) || defined(HAVE_DILITHIUM)
#define BENCH_ASYM
#endif

#if defined(BENCH_ASYM)
#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DH) || \
defined(HAVE_CURVE25519) || defined(HAVE_ED25519) || \
defined(HAVE_CURVE448) || defined(HAVE_ED448) || \
defined(WOLFSSL_HAVE_KYBER)
defined(WOLFSSL_HAVE_KYBER) || defined(HAVE_DILITHIUM)
static const char* bench_result_words2[][5] = {
#ifdef BENCH_MICROSECOND
{ "ops took", "μsec" , "avg" , "ops/μsec", NULL }, /* 0 English
@@ -2654,7 +2654,7 @@ static void bench_stats_sym_finish(const char* desc, int useDeviceID,
#if defined(HAVE_ECC) || !defined(NO_RSA) || !defined(NO_DH) || \
defined(HAVE_CURVE25519) || defined(HAVE_ED25519) || \
defined(HAVE_CURVE448) || defined(HAVE_ED448) || \
defined(WOLFSSL_HAVE_KYBER)
defined(WOLFSSL_HAVE_KYBER) || defined(HAVE_DILITHIUM)
static void bench_stats_asym_finish_ex(const char* algo, int strength,
const char* desc, const char* desc_extra, int useDeviceID, int count,
double start, int ret)
1,480 changes: 1,090 additions & 390 deletions wolfcrypt/src/dilithium.c

Large diffs are not rendered by default.

0 comments on commit ac52660

Please sign in to comment.