Skip to content

Commit

Permalink
Merge pull request #493 from pq-code-package/cbmc-sym
Browse files Browse the repository at this point in the history
CBMC: Prove `mlkem_shake256_prf` and `mlkem_shake256_rkprf`
  • Loading branch information
hanno-becker authored Dec 4, 2024
2 parents 112dbd3 + 7ffd473 commit f875b7f
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 7 deletions.
54 changes: 54 additions & 0 deletions cbmc/proofs/mlkem_shake256_prf/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: Apache-2.0

include ../Makefile_params.common

HARNESS_ENTRY = harness
HARNESS_FILE = mlkem_shake256_prf_harness

# This should be a unique identifier for this proof, and will appear on the
# Litani dashboard. It can be human-readable and contain spaces if you wish.
PROOF_UID = mlkem_shake256_prf

DEFINES +=
INCLUDES +=

REMOVE_FUNCTION_BODY +=
UNWINDSET +=

PROOF_SOURCES += $(PROOFDIR)/$(HARNESS_FILE).c
PROJECT_SOURCES += $(SRCDIR)/mlkem/symmetric-shake.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)mlkem_shake256_prf
USE_FUNCTION_CONTRACTS=$(FIPS202_NAMESPACE)shake256
APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1

# Disable any setting of EXTERNAL_SAT_SOLVER, and choose SMT backend instead
EXTERNAL_SAT_SOLVER=
CBMCFLAGS=--bitwuzla

FUNCTION_NAME = $(MLKEM_NAMESPACE)mlkem_shake256_prf

# If this proof is found to consume huge amounts of RAM, you can set the
# EXPENSIVE variable. With new enough versions of the proof tools, this will
# restrict the number of EXPENSIVE CBMC jobs running at once. See the
# documentation in Makefile.common under the "Job Pools" heading for details.
# EXPENSIVE = true

# This function is large enough to need...
CBMC_OBJECT_BITS = 8

# If you require access to a file-local ("static") function or object to conduct
# your proof, set the following (and do not include the original source file
# ("mlkem/poly.c") in PROJECT_SOURCES).
# REWRITTEN_SOURCES = $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i
# include ../Makefile.common
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_SOURCE = $(SRCDIR)/mlkem/poly.c
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_FUNCTIONS = foo bar
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_OBJECTS = baz
# Care is required with variables on the left-hand side: REWRITTEN_SOURCES must
# be set before including Makefile.common, but any use of variables on the
# left-hand side requires those variables to be defined. Hence, _SOURCE,
# _FUNCTIONS, _OBJECTS is set after including Makefile.common.

include ../Makefile.common
3 changes: 3 additions & 0 deletions cbmc/proofs/mlkem_shake256_prf/cbmc-proof.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

# This file marks this directory as containing a CBMC proof.
29 changes: 29 additions & 0 deletions cbmc/proofs/mlkem_shake256_prf/mlkem_shake256_prf_harness.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright (c) 2024 The mlkem-native project authors
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0

/*
* Insert copyright notice
*/


/*
* Insert project header files that
* - include the declaration of the function
* - include the types needed to declare function arguments
*/
#include <stdint.h>
#include "symmetric.h"

/**
* @brief Starting point for formal analysis
*
*/
void harness(void)
{
uint8_t *out;
size_t outlen;
uint8_t *key;
uint8_t nonce;
mlkem_shake256_prf(out, outlen, key, nonce);
}
54 changes: 54 additions & 0 deletions cbmc/proofs/mlkem_shake256_rkprf/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: Apache-2.0

include ../Makefile_params.common

HARNESS_ENTRY = harness
HARNESS_FILE = mlkem_shake256_rkprf_harness

# This should be a unique identifier for this proof, and will appear on the
# Litani dashboard. It can be human-readable and contain spaces if you wish.
PROOF_UID = mlkem_shake256_rkprf

DEFINES +=
INCLUDES +=

REMOVE_FUNCTION_BODY +=
UNWINDSET +=

PROOF_SOURCES += $(PROOFDIR)/$(HARNESS_FILE).c
PROJECT_SOURCES += $(SRCDIR)/mlkem/symmetric-shake.c $(SRCDIR)/fips202/fips202.c

CHECK_FUNCTION_CONTRACTS=$(MLKEM_NAMESPACE)mlkem_shake256_rkprf
USE_FUNCTION_CONTRACTS=$(FIPS202_NAMESPACE)shake256_inc_absorb $(FIPS202_NAMESPACE)shake256_inc_finalize $(FIPS202_NAMESPACE)shake256_inc_squeeze $(FIPS202_NAMESPACE)shake256_inc_init
APPLY_LOOP_CONTRACTS=on
USE_DYNAMIC_FRAMES=1

# Disable any setting of EXTERNAL_SAT_SOLVER, and choose SMT backend instead
EXTERNAL_SAT_SOLVER=
CBMCFLAGS=--bitwuzla

FUNCTION_NAME = $(MLKEM_NAMESPACE)mlkem_shake256_rkprf

# If this proof is found to consume huge amounts of RAM, you can set the
# EXPENSIVE variable. With new enough versions of the proof tools, this will
# restrict the number of EXPENSIVE CBMC jobs running at once. See the
# documentation in Makefile.common under the "Job Pools" heading for details.
# EXPENSIVE = true

# This function is large enough to need...
CBMC_OBJECT_BITS = 8

# If you require access to a file-local ("static") function or object to conduct
# your proof, set the following (and do not include the original source file
# ("mlkem/poly.c") in PROJECT_SOURCES).
# REWRITTEN_SOURCES = $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i
# include ../Makefile.common
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_SOURCE = $(SRCDIR)/mlkem/poly.c
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_FUNCTIONS = foo bar
# $(PROOFDIR)/<__SOURCE_FILE_BASENAME__>.i_OBJECTS = baz
# Care is required with variables on the left-hand side: REWRITTEN_SOURCES must
# be set before including Makefile.common, but any use of variables on the
# left-hand side requires those variables to be defined. Hence, _SOURCE,
# _FUNCTIONS, _OBJECTS is set after including Makefile.common.

include ../Makefile.common
3 changes: 3 additions & 0 deletions cbmc/proofs/mlkem_shake256_rkprf/cbmc-proof.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

# This file marks this directory as containing a CBMC proof.
28 changes: 28 additions & 0 deletions cbmc/proofs/mlkem_shake256_rkprf/mlkem_shake256_rkprf_harness.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) 2024 The mlkem-native project authors
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0

/*
* Insert copyright notice
*/


/*
* Insert project header files that
* - include the declaration of the function
* - include the types needed to declare function arguments
*/
#include <stdint.h>
#include "symmetric.h"

/**
* @brief Starting point for formal analysis
*
*/
void harness(void)
{
uint8_t *out;
uint8_t *key;
uint8_t *input;
mlkem_shake256_rkprf(out, key, input);
}
32 changes: 27 additions & 5 deletions fips202/fips202.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,43 @@ void shake128_ctx_release(shake128ctx *state);

/* Initialize incremental hashing API */
#define shake256_inc_init FIPS202_NAMESPACE(shake256_inc_init)
void shake256_inc_init(shake256incctx *state);
void shake256_inc_init(shake256incctx *state)
__contract__(
requires(memory_no_alias(state, sizeof(shake256incctx)))
assigns(memory_slice(state, sizeof(shake256incctx)))
);


#define shake256_inc_absorb FIPS202_NAMESPACE(shake256_inc_absorb)
void shake256_inc_absorb(shake256incctx *state, const uint8_t *input,
size_t inlen);
size_t inlen)
__contract__(
requires(memory_no_alias(state, sizeof(shake256incctx)))
requires(memory_no_alias(input, inlen))
assigns(memory_slice(state, sizeof(shake256incctx)))
);


/* Prepares for squeeze phase */
#define shake256_inc_finalize FIPS202_NAMESPACE(shake256_inc_finalize)
void shake256_inc_finalize(shake256incctx *state);
void shake256_inc_finalize(shake256incctx *state)
__contract__(
requires(memory_no_alias(state, sizeof(shake256incctx)))
assigns(memory_slice(state, sizeof(shake256incctx)))
);

/* Squeeze output out of the sponge.
*
* Supports being called multiple times
*/
#define shake256_inc_squeeze FIPS202_NAMESPACE(shake256_inc_squeeze)
void shake256_inc_squeeze(uint8_t *output, size_t outlen,
shake256incctx *state);
void shake256_inc_squeeze(uint8_t *output, size_t outlen, shake256incctx *state)
__contract__(
requires(memory_no_alias(state, sizeof(shake256incctx)))
requires(memory_no_alias(output, outlen))
assigns(memory_slice(output, outlen))
assigns(memory_slice(state, sizeof(shake256incctx)))
);

/* Free the state */
#define shake256_inc_ctx_release FIPS202_NAMESPACE(shake256_inc_ctx_release)
Expand Down
11 changes: 9 additions & 2 deletions fips202/fips202x4.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#define shake128x4_absorb FIPS202_NAMESPACE(shake128x4_absorb)
void shake128x4_absorb(keccakx4_state *state, const uint8_t *in0,
const uint8_t *in1, const uint8_t *in2,
const uint8_t *in3, size_t inlen);

const uint8_t *in3, size_t inlen)
__contract__(
requires(memory_no_alias(state, sizeof(keccakx4_state)))
requires(memory_no_alias(in0, inlen))
requires(memory_no_alias(in1, inlen))
requires(memory_no_alias(in2, inlen))
requires(memory_no_alias(in3, inlen))
assigns(object_whole(state))
);

#define shake256x4_absorb FIPS202_NAMESPACE(shake256x4_absorb)
void shake256x4_absorb(keccakx4_state *state, const uint8_t *in0,
Expand Down

17 comments on commit f875b7f

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 29176 cycles 29175 cycles 1.00
ML-KEM-512 encaps 35851 cycles 35851 cycles 1
ML-KEM-512 decaps 46652 cycles 46654 cycles 1.00
ML-KEM-768 keypair 49175 cycles 49175 cycles 1
ML-KEM-768 encaps 55841 cycles 55842 cycles 1.00
ML-KEM-768 decaps 71007 cycles 71008 cycles 1.00
ML-KEM-1024 keypair 72212 cycles 72213 cycles 1.00
ML-KEM-1024 encaps 81519 cycles 81522 cycles 1.00
ML-KEM-1024 decaps 102034 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 f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 13888 cycles 13826 cycles 1.00
ML-KEM-512 encaps 18214 cycles 18206 cycles 1.00
ML-KEM-512 decaps 24098 cycles 24136 cycles 1.00
ML-KEM-768 keypair 22457 cycles 22449 cycles 1.00
ML-KEM-768 encaps 24537 cycles 24530 cycles 1.00
ML-KEM-768 decaps 32556 cycles 32562 cycles 1.00
ML-KEM-1024 keypair 32065 cycles 32068 cycles 1.00
ML-KEM-1024 encaps 35693 cycles 35768 cycles 1.00
ML-KEM-1024 decaps 47173 cycles 47196 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 20323 cycles 20333 cycles 1.00
ML-KEM-512 encaps 27096 cycles 27122 cycles 1.00
ML-KEM-512 decaps 36212 cycles 36246 cycles 1.00
ML-KEM-768 keypair 34888 cycles 34874 cycles 1.00
ML-KEM-768 encaps 38241 cycles 38228 cycles 1.00
ML-KEM-768 decaps 51401 cycles 51442 cycles 1.00
ML-KEM-1024 keypair 47930 cycles 48095 cycles 1.00
ML-KEM-1024 encaps 54126 cycles 54307 cycles 1.00
ML-KEM-1024 decaps 72068 cycles 72272 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 18109 cycles 18105 cycles 1.00
ML-KEM-512 encaps 23084 cycles 23049 cycles 1.00
ML-KEM-512 decaps 30397 cycles 30365 cycles 1.00
ML-KEM-768 keypair 31016 cycles 31040 cycles 1.00
ML-KEM-768 encaps 33970 cycles 33992 cycles 1.00
ML-KEM-768 decaps 44785 cycles 44795 cycles 1.00
ML-KEM-1024 keypair 44515 cycles 44475 cycles 1.00
ML-KEM-1024 encaps 50033 cycles 49934 cycles 1.00
ML-KEM-1024 decaps 64316 cycles 64410 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 36221 cycles 36274 cycles 1.00
ML-KEM-512 encaps 46462 cycles 46425 cycles 1.00
ML-KEM-512 decaps 61957 cycles 61794 cycles 1.00
ML-KEM-768 keypair 59001 cycles 59022 cycles 1.00
ML-KEM-768 encaps 73079 cycles 73136 cycles 1.00
ML-KEM-768 decaps 91877 cycles 91674 cycles 1.00
ML-KEM-1024 keypair 88481 cycles 88422 cycles 1.00
ML-KEM-1024 encaps 109310 cycles 109490 cycles 1.00
ML-KEM-1024 decaps 133641 cycles 133800 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 15090 cycles 15095 cycles 1.00
ML-KEM-512 encaps 19751 cycles 19759 cycles 1.00
ML-KEM-512 decaps 26385 cycles 26399 cycles 1.00
ML-KEM-768 keypair 25737 cycles 25602 cycles 1.01
ML-KEM-768 encaps 28202 cycles 28206 cycles 1.00
ML-KEM-768 decaps 38214 cycles 38237 cycles 1.00
ML-KEM-1024 keypair 35507 cycles 34906 cycles 1.02
ML-KEM-1024 encaps 40674 cycles 39691 cycles 1.02
ML-KEM-1024 decaps 54642 cycles 53117 cycles 1.03

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 56727 cycles 56794 cycles 1.00
ML-KEM-512 encaps 71804 cycles 71874 cycles 1.00
ML-KEM-512 decaps 96365 cycles 96458 cycles 1.00
ML-KEM-768 keypair 91904 cycles 91852 cycles 1.00
ML-KEM-768 encaps 111518 cycles 111509 cycles 1.00
ML-KEM-768 decaps 144547 cycles 144573 cycles 1.00
ML-KEM-1024 keypair 134749 cycles 134776 cycles 1.00
ML-KEM-1024 encaps 160160 cycles 160403 cycles 1.00
ML-KEM-1024 decaps 201556 cycles 201536 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 52310 cycles 52283 cycles 1.00
ML-KEM-512 encaps 67744 cycles 67755 cycles 1.00
ML-KEM-512 decaps 92563 cycles 92689 cycles 1.00
ML-KEM-768 keypair 84628 cycles 84632 cycles 1.00
ML-KEM-768 encaps 104797 cycles 104807 cycles 1.00
ML-KEM-768 decaps 138104 cycles 137726 cycles 1.00
ML-KEM-1024 keypair 125419 cycles 125447 cycles 1.00
ML-KEM-1024 encaps 149648 cycles 149691 cycles 1.00
ML-KEM-1024 decaps 192189 cycles 192820 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 51295 cycles 51456 cycles 1.00
ML-KEM-512 encaps 58341 cycles 59714 cycles 0.98
ML-KEM-512 decaps 75202 cycles 75476 cycles 1.00
ML-KEM-768 keypair 87188 cycles 89405 cycles 0.98
ML-KEM-768 encaps 96260 cycles 97492 cycles 0.99
ML-KEM-768 decaps 120407 cycles 119923 cycles 1.00
ML-KEM-1024 keypair 131465 cycles 132345 cycles 0.99
ML-KEM-1024 encaps 146288 cycles 146025 cycles 1.00
ML-KEM-1024 decaps 178004 cycles 178032 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 45701 cycles 45972 cycles 0.99
ML-KEM-512 encaps 58771 cycles 58802 cycles 1.00
ML-KEM-512 decaps 80002 cycles 80027 cycles 1.00
ML-KEM-768 keypair 74611 cycles 74656 cycles 1.00
ML-KEM-768 encaps 91454 cycles 91513 cycles 1.00
ML-KEM-768 decaps 120186 cycles 120193 cycles 1.00
ML-KEM-1024 keypair 109878 cycles 110252 cycles 1.00
ML-KEM-1024 encaps 131020 cycles 131041 cycles 1.00
ML-KEM-1024 decaps 167852 cycles 167695 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 19031 cycles 19030 cycles 1.00
ML-KEM-512 encaps 23843 cycles 23843 cycles 1
ML-KEM-512 decaps 31227 cycles 31229 cycles 1.00
ML-KEM-768 keypair 32334 cycles 32329 cycles 1.00
ML-KEM-768 encaps 36082 cycles 36085 cycles 1.00
ML-KEM-768 decaps 46487 cycles 46487 cycles 1
ML-KEM-1024 keypair 46967 cycles 46970 cycles 1.00
ML-KEM-1024 encaps 53083 cycles 53087 cycles 1.00
ML-KEM-1024 decaps 67398 cycles 67406 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 18264 cycles 18268 cycles 1.00
ML-KEM-512 encaps 22477 cycles 22479 cycles 1.00
ML-KEM-512 decaps 29397 cycles 29399 cycles 1.00
ML-KEM-768 keypair 30774 cycles 30772 cycles 1.00
ML-KEM-768 encaps 34058 cycles 34059 cycles 1.00
ML-KEM-768 decaps 43909 cycles 43911 cycles 1.00
ML-KEM-1024 keypair 44486 cycles 44486 cycles 1
ML-KEM-1024 encaps 50208 cycles 50209 cycles 1.00
ML-KEM-1024 decaps 63635 cycles 63641 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 29177 cycles 29225 cycles 1.00
ML-KEM-512 encaps 35861 cycles 35945 cycles 1.00
ML-KEM-512 decaps 46667 cycles 46769 cycles 1.00
ML-KEM-768 keypair 49191 cycles 49356 cycles 1.00
ML-KEM-768 encaps 55863 cycles 56083 cycles 1.00
ML-KEM-768 decaps 70978 cycles 71255 cycles 1.00
ML-KEM-1024 keypair 72180 cycles 72196 cycles 1.00
ML-KEM-1024 encaps 81626 cycles 81636 cycles 1.00
ML-KEM-1024 decaps 102071 cycles 102095 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 45360 cycles 45370 cycles 1.00
ML-KEM-512 encaps 56169 cycles 56178 cycles 1.00
ML-KEM-512 decaps 75087 cycles 75101 cycles 1.00
ML-KEM-768 keypair 74867 cycles 74858 cycles 1.00
ML-KEM-768 encaps 89190 cycles 89188 cycles 1.00
ML-KEM-768 decaps 114549 cycles 114545 cycles 1.00
ML-KEM-1024 keypair 111084 cycles 111077 cycles 1.00
ML-KEM-1024 encaps 129926 cycles 129993 cycles 1.00
ML-KEM-1024 decaps 162491 cycles 162569 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 41910 cycles 41915 cycles 1.00
ML-KEM-512 encaps 51761 cycles 51762 cycles 1.00
ML-KEM-512 decaps 69327 cycles 69323 cycles 1.00
ML-KEM-768 keypair 69066 cycles 69072 cycles 1.00
ML-KEM-768 encaps 82684 cycles 82685 cycles 1.00
ML-KEM-768 decaps 106477 cycles 106477 cycles 1
ML-KEM-1024 keypair 102241 cycles 102447 cycles 1.00
ML-KEM-1024 encaps 120658 cycles 120644 cycles 1.00
ML-KEM-1024 decaps 150670 cycles 150597 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 71123 cycles 71103 cycles 1.00
ML-KEM-512 encaps 87833 cycles 87949 cycles 1.00
ML-KEM-512 decaps 118150 cycles 118383 cycles 1.00
ML-KEM-768 keypair 117374 cycles 117372 cycles 1.00
ML-KEM-768 encaps 139258 cycles 139304 cycles 1.00
ML-KEM-768 decaps 180017 cycles 180129 cycles 1.00
ML-KEM-1024 keypair 175258 cycles 174769 cycles 1.00
ML-KEM-1024 encaps 202709 cycles 202279 cycles 1.00
ML-KEM-1024 decaps 254727 cycles 254196 cycles 1.00

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

@oqs-bot
Copy link

@oqs-bot oqs-bot commented on f875b7f Dec 4, 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: f875b7f Previous: 112dbd3 Ratio
ML-KEM-512 keypair 58015 cycles 58013 cycles 1.00
ML-KEM-512 encaps 65686 cycles 65692 cycles 1.00
ML-KEM-512 decaps 84357 cycles 84336 cycles 1.00
ML-KEM-768 keypair 98206 cycles 98268 cycles 1.00
ML-KEM-768 encaps 111131 cycles 110020 cycles 1.01
ML-KEM-768 decaps 136396 cycles 136916 cycles 1.00
ML-KEM-1024 keypair 148760 cycles 148986 cycles 1.00
ML-KEM-1024 encaps 166100 cycles 166299 cycles 1.00
ML-KEM-1024 decaps 202266 cycles 202470 cycles 1.00

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

Please sign in to comment.