Skip to content

Commit

Permalink
Merge pull request #479 from pq-code-package/remove_todo
Browse files Browse the repository at this point in the history
Resolve or remove various small TODOs
  • Loading branch information
hanno-becker authored Dec 3, 2024
2 parents 425bc20 + 5cdbeea commit b5f9627
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 50 deletions.
14 changes: 9 additions & 5 deletions cbmc/proofs/poly_compress_du/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ PROOF_SOURCES += $(PROOFDIR)/$(HARNESS_FILE).c
PROJECT_SOURCES += $(SRCDIR)/mlkem/poly.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)poly_compress_du
USE_FUNCTION_CONTRACTS =

# TODO: We should be calling scalar_decompress_xxx by contract here,
# but it does not seem to work yet because they are marked as static inline.
# For K = 2 or 3, the code calls scalar_compress_d10, so
ifeq ($(MLKEM_K),4)
USE_FUNCTION_CONTRACTS = scalar_compress_d11
else
USE_FUNCTION_CONTRACTS = scalar_compress_d10
endif
# ifeq ($(MLKEM_K),4)
# USE_FUNCTION_CONTRACTS = scalar_compress_d11
# else
# USE_FUNCTION_CONTRACTS = scalar_compress_d10
# endif

APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1
Expand Down
14 changes: 9 additions & 5 deletions cbmc/proofs/poly_compress_dv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ PROOF_SOURCES += $(PROOFDIR)/$(HARNESS_FILE).c
PROJECT_SOURCES += $(SRCDIR)/mlkem/poly.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)poly_compress_dv
ifeq ($(MLKEM_K),4)
USE_FUNCTION_CONTRACTS = scalar_compress_d5
else
USE_FUNCTION_CONTRACTS = scalar_compress_d4
endif

USE_FUNCTION_CONTRACTS =
# TODO: We should be calling scalar_decompress_xxx by contract here,
# but it does not seem to work yet because they are marked as static inline.
# ifeq ($(MLKEM_K),4)
# USE_FUNCTION_CONTRACTS = scalar_compress_d5
# else
# USE_FUNCTION_CONTRACTS = scalar_compress_d4
# endif
APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1

Expand Down
13 changes: 8 additions & 5 deletions cbmc/proofs/poly_decompress_du/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ PROJECT_SOURCES += $(SRCDIR)/mlkem/poly.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)poly_decompress_du

USE_FUNCTION_CONTRACTS =
# TODO: We should be calling scalar_decompress_xxx by contract here,
# but it does not seem to work yet because they are marked as static inline.
# For K = 2 or 3, the code calls scalar_decompress_d10, so
ifeq ($(MLKEM_K),4)
USE_FUNCTION_CONTRACTS = scalar_decompress_d11
else
USE_FUNCTION_CONTRACTS = scalar_decompress_d10
endif
# ifeq ($(MLKEM_K),4)
# USE_FUNCTION_CONTRACTS = scalar_decompress_d11
# else
# USE_FUNCTION_CONTRACTS = scalar_decompress_d10
# endif

APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1
Expand Down
13 changes: 8 additions & 5 deletions cbmc/proofs/poly_decompress_dv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ PROJECT_SOURCES += $(SRCDIR)/mlkem/poly.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)poly_decompress_dv

USE_FUNCTION_CONTRACTS =
# TODO: We should be calling scalar_decompress_xxx by contract here,
# but it does not seem to work yet because they are marked as static inline.
# For K = 2 or 3, the code calls scalar_decompress_d4, so
ifeq ($(MLKEM_K),4)
USE_FUNCTION_CONTRACTS = scalar_decompress_d5
else
USE_FUNCTION_CONTRACTS = scalar_decompress_d4
endif
# ifeq ($(MLKEM_K),4)
# USE_FUNCTION_CONTRACTS = scalar_decompress_d5
# else
# USE_FUNCTION_CONTRACTS = scalar_decompress_d4
# endif

APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1
Expand Down
15 changes: 5 additions & 10 deletions mlkem/indcpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ static void unpack_pk(polyvec *pk, uint8_t seed[MLKEM_SYMBYTES],
memcpy(seed, packedpk + MLKEM_POLYVECBYTES, MLKEM_SYMBYTES);

/*
* TODO! pk must be subject to a "modulus check" at the top-level
* crypto_kem_enc_derand(). Once that's done, the reduction is no
* longer necessary here.
* TODO! We know from the modulus check that this will result in an
* unsigned canonical polynomial, but CBMC does not know it. We should
* weaken the specification of `unpack_pk()` and all depending functions
* to work with the weaker 4096-bound, so that the proofs go through
* without the need of this redundant call to polyvec_reduce().
*/
polyvec_reduce(pk);
}
Expand Down Expand Up @@ -291,13 +293,6 @@ void gen_matrix(polyvec *a, const uint8_t seed[MLKEM_SYMBYTES], int transposed)
memcpy(seedxy[j], seed, MLKEM_SYMBYTES);
}

/*
* TODO: All loops in this function should be unrolled for decent
* performance.
* Either add suitable pragmas, or split gen_matrix according to MLKEM_K
* and unroll by hand.
*/

for (i = 0; i < (MLKEM_K * MLKEM_K / KECCAK_WAY) * KECCAK_WAY;
i += KECCAK_WAY)
{
Expand Down
2 changes: 1 addition & 1 deletion mlkem/native/arith_native.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static INLINE void poly_frombytes_native(poly *a,
*
* Return -1 if the native implementation does not support the input lengths.
* Otherwise, returns non-negative number of sampled 16-bit integers (at most
*len).
* len).
**************************************************/
static INLINE int rej_uniform_native(int16_t *r, unsigned int len,
const uint8_t *buf, unsigned int buflen);
Expand Down
1 change: 0 additions & 1 deletion mlkem/native/x86_64/arith_native_x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
((12 * MLKEM_N / 8 * (1 << 12) / MLKEM_Q + SHAKE128_RATE) / SHAKE128_RATE)
#define REJ_UNIFORM_AVX_BUFLEN (REJ_UNIFORM_AVX_NBLOCKS * SHAKE128_RATE)

/* TODO: Document buffer constraints */
#define rej_uniform_avx2 MLKEM_NAMESPACE(rej_uniform_avx2)
unsigned int rej_uniform_avx2(int16_t *r, const uint8_t *buf);

Expand Down
8 changes: 1 addition & 7 deletions mlkem/native/x86_64/profiles/default.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ static INLINE void poly_mulcache_compute_native(poly_mulcache *x, const poly *y)
{
/* AVX2 backend does not use mulcache */
((void)y);

/*
* TODO! The mulcache is subject to the absolute bound < q
* This needs to be dropped if the mulcache is not present.
* Until that's done, memset to 0 to avoid failure.
*/
memset(x, 0, sizeof(poly_mulcache));
((void)x);
}

static INLINE void polyvec_basemul_acc_montgomery_cached_native(
Expand Down
6 changes: 5 additions & 1 deletion mlkem/poly.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ void poly_basemul_montgomery_cached(poly *r, const poly *a, const poly *b,
const poly_mulcache *b_cache)
{
int i;
POLY_BOUND(b_cache, MLKEM_Q);

for (i = 0; i < MLKEM_N / 4; i++)
__loop__(
assigns(i, object_whole(r))
Expand Down Expand Up @@ -559,6 +561,8 @@ void poly_mulcache_compute(poly_mulcache *x, const poly *a)
void poly_mulcache_compute(poly_mulcache *x, const poly *a)
{
poly_mulcache_compute_native(x, a);
POLY_BOUND(x, MLKEM_Q);
/* Omitting POLY_BOUND(x, MLKEM_Q) since native implementations may
* decide not to use a mulcache. Note that the C backend implementation
* of poly_basemul_montgomery_cached() does still include the check. */
}
#endif /* MLKEM_USE_NATIVE_POLY_MULCACHE_COMPUTE */
13 changes: 4 additions & 9 deletions mlkem/poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ __contract__(
#pragma CPROVER check push
#pragma CPROVER check disable "unsigned-overflow"
#endif
/* TODO: do the same for the other static inline functions */
STATIC_INLINE_TESTABLE
uint32_t scalar_compress_d10(uint16_t u)
static INLINE uint32_t scalar_compress_d10(uint16_t u)
__contract__(
requires(u <= MLKEM_Q - 1)
ensures(return_value < (1u << 10))
Expand Down Expand Up @@ -244,8 +242,7 @@ __contract__(
#pragma CPROVER check push
#pragma CPROVER check disable "unsigned-overflow"
#endif
STATIC_INLINE_TESTABLE
uint32_t scalar_compress_d11(uint16_t u)
static INLINE uint32_t scalar_compress_d11(uint16_t u)
__contract__(
requires(u <= MLKEM_Q - 1)
ensures(return_value < (1u << 11))
Expand All @@ -270,8 +267,7 @@ __contract__(
* Arguments: - u: Unsigned canonical modulus modulo 16
* to be decompressed.
************************************************************/
STATIC_INLINE_TESTABLE
uint16_t scalar_decompress_d11(uint32_t u)
static INLINE uint16_t scalar_decompress_d11(uint32_t u)
__contract__(
requires(0 <= u && u < 2048)
ensures(return_value <= (MLKEM_Q - 1))
Expand All @@ -295,8 +291,7 @@ __contract__(
*
* Arguments: c: signed coefficient to be converted
************************************************************/
STATIC_INLINE_TESTABLE
uint16_t scalar_signed_to_unsigned_q(int16_t c)
static INLINE uint16_t scalar_signed_to_unsigned_q(int16_t c)
__contract__(
requires(c >= -(MLKEM_Q - 1) && c <= (MLKEM_Q - 1))
ensures(return_value >= 0 && return_value <= (MLKEM_Q - 1))
Expand Down
4 changes: 3 additions & 1 deletion mlkem/polyvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ void polyvec_basemul_acc_montgomery_cached(poly *r, const polyvec *a,
{
POLYVEC_BOUND(a, MLKEM_Q);
POLYVEC_BOUND(b, NTT_BOUND);
POLYVEC_BOUND(b_cache, MLKEM_Q);
/* Omitting POLYVEC_BOUND(b_cache, MLKEM_Q) since native implementations may
* decide not to use a mulcache. Note that the C backend implementation
* of poly_basemul_montgomery_cached() does still include the check. */
polyvec_basemul_acc_montgomery_cached_native(r, a, b, b_cache);
}
#endif /* MLKEM_USE_NATIVE_POLYVEC_BASEMUL_ACC_MONTGOMERY_CACHED */
Expand Down

17 comments on commit b5f9627

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A76 (Raspberry Pi 5) benchmarks

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 29175 cycles 29175 cycles 1
ML-KEM-512 encaps 35852 cycles 35852 cycles 1
ML-KEM-512 decaps 46655 cycles 46653 cycles 1.00
ML-KEM-768 keypair 49173 cycles 49174 cycles 1.00
ML-KEM-768 encaps 55842 cycles 55839 cycles 1.00
ML-KEM-768 decaps 71009 cycles 71008 cycles 1.00
ML-KEM-1024 keypair 72211 cycles 72211 cycles 1
ML-KEM-1024 encaps 81518 cycles 81519 cycles 1.00
ML-KEM-1024 decaps 102031 cycles 102032 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 4th gen (c7i)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 13867 cycles 13864 cycles 1.00
ML-KEM-512 encaps 18209 cycles 18199 cycles 1.00
ML-KEM-512 decaps 24114 cycles 24094 cycles 1.00
ML-KEM-768 keypair 22529 cycles 22428 cycles 1.00
ML-KEM-768 encaps 24606 cycles 24506 cycles 1.00
ML-KEM-768 decaps 32992 cycles 32521 cycles 1.01
ML-KEM-1024 keypair 32044 cycles 32155 cycles 1.00
ML-KEM-1024 encaps 35669 cycles 35727 cycles 1.00
ML-KEM-1024 decaps 47172 cycles 47393 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 3rd gen (c6i)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 20406 cycles 20326 cycles 1.00
ML-KEM-512 encaps 27162 cycles 27129 cycles 1.00
ML-KEM-512 decaps 36252 cycles 36210 cycles 1.00
ML-KEM-768 keypair 34879 cycles 34834 cycles 1.00
ML-KEM-768 encaps 38211 cycles 38193 cycles 1.00
ML-KEM-768 decaps 51431 cycles 51360 cycles 1.00
ML-KEM-1024 keypair 47922 cycles 48074 cycles 1.00
ML-KEM-1024 encaps 54120 cycles 54249 cycles 1.00
ML-KEM-1024 decaps 72069 cycles 72137 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 3rd gen (c6a)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 18125 cycles 18152 cycles 1.00
ML-KEM-512 encaps 23108 cycles 23137 cycles 1.00
ML-KEM-512 decaps 30437 cycles 30396 cycles 1.00
ML-KEM-768 keypair 31062 cycles 31050 cycles 1.00
ML-KEM-768 encaps 33988 cycles 33990 cycles 1.00
ML-KEM-768 decaps 44793 cycles 44804 cycles 1.00
ML-KEM-1024 keypair 44464 cycles 44728 cycles 0.99
ML-KEM-1024 encaps 49925 cycles 50036 cycles 1.00
ML-KEM-1024 decaps 64360 cycles 64742 cycles 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 4th gen (c7a)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 15094 cycles 15076 cycles 1.00
ML-KEM-512 encaps 19754 cycles 19754 cycles 1
ML-KEM-512 decaps 26388 cycles 26413 cycles 1.00
ML-KEM-768 keypair 25558 cycles 25586 cycles 1.00
ML-KEM-768 encaps 28162 cycles 28233 cycles 1.00
ML-KEM-768 decaps 37988 cycles 38203 cycles 0.99
ML-KEM-1024 keypair 35553 cycles 35635 cycles 1.00
ML-KEM-1024 encaps 40680 cycles 41255 cycles 0.99
ML-KEM-1024 decaps 54473 cycles 54608 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 4th gen (c7i) (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 36267 cycles 36182 cycles 1.00
ML-KEM-512 encaps 46461 cycles 46391 cycles 1.00
ML-KEM-512 decaps 61881 cycles 61856 cycles 1.00
ML-KEM-768 keypair 58961 cycles 59068 cycles 1.00
ML-KEM-768 encaps 73061 cycles 73046 cycles 1.00
ML-KEM-768 decaps 91662 cycles 91650 cycles 1.00
ML-KEM-1024 keypair 88471 cycles 88479 cycles 1.00
ML-KEM-1024 encaps 109327 cycles 109304 cycles 1.00
ML-KEM-1024 decaps 133709 cycles 133582 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton3

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 19031 cycles 19032 cycles 1.00
ML-KEM-512 encaps 23843 cycles 23843 cycles 1
ML-KEM-512 decaps 31230 cycles 31228 cycles 1.00
ML-KEM-768 keypair 32332 cycles 32332 cycles 1
ML-KEM-768 encaps 36086 cycles 36084 cycles 1.00
ML-KEM-768 decaps 46491 cycles 46492 cycles 1.00
ML-KEM-1024 keypair 46964 cycles 46970 cycles 1.00
ML-KEM-1024 encaps 53086 cycles 53090 cycles 1.00
ML-KEM-1024 decaps 67401 cycles 67403 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A55 (Snapdragon 888) benchmarks

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 58031 cycles 58051 cycles 1.00
ML-KEM-512 encaps 65732 cycles 65739 cycles 1.00
ML-KEM-512 decaps 84332 cycles 84356 cycles 1.00
ML-KEM-768 keypair 98618 cycles 98398 cycles 1.00
ML-KEM-768 encaps 110516 cycles 110291 cycles 1.00
ML-KEM-768 decaps 137582 cycles 136959 cycles 1.00
ML-KEM-1024 keypair 150000 cycles 149545 cycles 1.00
ML-KEM-1024 encaps 166971 cycles 166765 cycles 1.00
ML-KEM-1024 decaps 203311 cycles 203329 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton2

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 29176 cycles 29175 cycles 1.00
ML-KEM-512 encaps 35859 cycles 35860 cycles 1.00
ML-KEM-512 decaps 46664 cycles 46665 cycles 1.00
ML-KEM-768 keypair 49198 cycles 49225 cycles 1.00
ML-KEM-768 encaps 55870 cycles 55892 cycles 1.00
ML-KEM-768 decaps 70985 cycles 71026 cycles 1.00
ML-KEM-1024 keypair 72174 cycles 72173 cycles 1.00
ML-KEM-1024 encaps 81621 cycles 81620 cycles 1.00
ML-KEM-1024 decaps 102067 cycles 102066 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intel Xeon 3rd gen (c6i) (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 56697 cycles 56710 cycles 1.00
ML-KEM-512 encaps 71820 cycles 71778 cycles 1.00
ML-KEM-512 decaps 96361 cycles 96333 cycles 1.00
ML-KEM-768 keypair 91823 cycles 91872 cycles 1.00
ML-KEM-768 encaps 111402 cycles 111635 cycles 1.00
ML-KEM-768 decaps 144449 cycles 144630 cycles 1.00
ML-KEM-1024 keypair 134612 cycles 134508 cycles 1.00
ML-KEM-1024 encaps 160084 cycles 159842 cycles 1.00
ML-KEM-1024 decaps 201685 cycles 201292 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 4th gen (c7a) (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 45725 cycles 45709 cycles 1.00
ML-KEM-512 encaps 58775 cycles 58758 cycles 1.00
ML-KEM-512 decaps 80010 cycles 79981 cycles 1.00
ML-KEM-768 keypair 74608 cycles 74596 cycles 1.00
ML-KEM-768 encaps 91434 cycles 91419 cycles 1.00
ML-KEM-768 decaps 120124 cycles 120104 cycles 1.00
ML-KEM-1024 keypair 109836 cycles 109864 cycles 1.00
ML-KEM-1024 encaps 130932 cycles 130993 cycles 1.00
ML-KEM-1024 decaps 167588 cycles 167584 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AMD EPYC 3rd gen (c6a) (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 52311 cycles 52315 cycles 1.00
ML-KEM-512 encaps 67788 cycles 67782 cycles 1.00
ML-KEM-512 decaps 92638 cycles 92653 cycles 1.00
ML-KEM-768 keypair 84658 cycles 84684 cycles 1.00
ML-KEM-768 encaps 104851 cycles 104896 cycles 1.00
ML-KEM-768 decaps 137784 cycles 138153 cycles 1.00
ML-KEM-1024 keypair 125478 cycles 125485 cycles 1.00
ML-KEM-1024 encaps 150020 cycles 149721 cycles 1.00
ML-KEM-1024 decaps 192389 cycles 192289 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton4

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 18265 cycles 18267 cycles 1.00
ML-KEM-512 encaps 22477 cycles 22476 cycles 1.00
ML-KEM-512 decaps 29402 cycles 29398 cycles 1.00
ML-KEM-768 keypair 30772 cycles 30773 cycles 1.00
ML-KEM-768 encaps 34062 cycles 34057 cycles 1.00
ML-KEM-768 decaps 43907 cycles 43907 cycles 1
ML-KEM-1024 keypair 44486 cycles 44486 cycles 1
ML-KEM-1024 encaps 50207 cycles 50206 cycles 1.00
ML-KEM-1024 decaps 63631 cycles 63637 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton3 (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 45370 cycles 45364 cycles 1.00
ML-KEM-512 encaps 56173 cycles 56172 cycles 1.00
ML-KEM-512 decaps 75096 cycles 75093 cycles 1.00
ML-KEM-768 keypair 74879 cycles 74870 cycles 1.00
ML-KEM-768 encaps 89204 cycles 89191 cycles 1.00
ML-KEM-768 decaps 114561 cycles 114560 cycles 1.00
ML-KEM-1024 keypair 111083 cycles 111077 cycles 1.00
ML-KEM-1024 encaps 130004 cycles 129998 cycles 1.00
ML-KEM-1024 decaps 162579 cycles 162583 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton4 (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 41906 cycles 41913 cycles 1.00
ML-KEM-512 encaps 51762 cycles 51763 cycles 1.00
ML-KEM-512 decaps 69324 cycles 69327 cycles 1.00
ML-KEM-768 keypair 69051 cycles 69072 cycles 1.00
ML-KEM-768 encaps 82688 cycles 82683 cycles 1.00
ML-KEM-768 decaps 106478 cycles 106478 cycles 1
ML-KEM-1024 keypair 102458 cycles 102441 cycles 1.00
ML-KEM-1024 encaps 120645 cycles 120643 cycles 1.00
ML-KEM-1024 decaps 150669 cycles 150595 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graviton2 (no-opt)

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 71154 cycles 71125 cycles 1.00
ML-KEM-512 encaps 87865 cycles 87854 cycles 1.00
ML-KEM-512 decaps 118174 cycles 118170 cycles 1.00
ML-KEM-768 keypair 117561 cycles 117630 cycles 1.00
ML-KEM-768 encaps 139340 cycles 139373 cycles 1.00
ML-KEM-768 decaps 180062 cycles 180122 cycles 1.00
ML-KEM-1024 keypair 175399 cycles 175417 cycles 1.00
ML-KEM-1024 encaps 202947 cycles 202895 cycles 1.00
ML-KEM-1024 decaps 254234 cycles 254246 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on b5f9627 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arm Cortex-A72 (Raspberry Pi 4) benchmarks

Benchmark suite Current: b5f9627 Previous: 425bc20 Ratio
ML-KEM-512 keypair 51527 cycles 51511 cycles 1.00
ML-KEM-512 encaps 58605 cycles 58337 cycles 1.00
ML-KEM-512 decaps 75388 cycles 74889 cycles 1.01
ML-KEM-768 keypair 87796 cycles 87085 cycles 1.01
ML-KEM-768 encaps 96620 cycles 95891 cycles 1.01
ML-KEM-768 decaps 120278 cycles 120427 cycles 1.00
ML-KEM-1024 keypair 131709 cycles 132049 cycles 1.00
ML-KEM-1024 encaps 145878 cycles 145650 cycles 1.00
ML-KEM-1024 decaps 177156 cycles 177164 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.