Skip to content

Commit

Permalink
Merge pull request #597 from pq-code-package/acvp_client
Browse files Browse the repository at this point in the history
ACVP: Remove duplicated ACVP test logic between `acvp_client.py` and `tests` script
  • Loading branch information
hanno-becker authored Dec 31, 2024
2 parents 13ca898 + 7330dd8 commit 169a6c3
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 139 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ quickcheck: checkall
buildall: mlkem nistkat kat acvp
$(Q)echo " Everything builds fine!"

checkall: buildall check_kat check_nistkat check_func check_acvp
checkall: check_kat check_nistkat check_func check_acvp
$(Q)echo " Everything checks fine!"

check_kat: buildall
check_kat: kat
$(MLKEM512_DIR)/bin/gen_KAT512 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-512 kat-sha256
$(MLKEM768_DIR)/bin/gen_KAT768 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-768 kat-sha256
$(MLKEM1024_DIR)/bin/gen_KAT1024 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-1024 kat-sha256

check_nistkat: buildall
check_nistkat: nistkat
$(MLKEM512_DIR)/bin/gen_NISTKAT512 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-512 nistkat-sha256
$(MLKEM768_DIR)/bin/gen_NISTKAT768 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-768 nistkat-sha256
$(MLKEM1024_DIR)/bin/gen_NISTKAT1024 | sha256sum | cut -d " " -f 1 | xargs ./META.sh ML-KEM-1024 nistkat-sha256

check_func: buildall
check_func: mlkem
$(MLKEM512_DIR)/bin/test_mlkem512
$(MLKEM768_DIR)/bin/test_mlkem768
$(MLKEM1024_DIR)/bin/test_mlkem1024

check_acvp: buildall
check_acvp: acvp
python3 ./test/acvp_client.py

lib: $(BUILD_DIR)/libmlkem.a
Expand All @@ -43,7 +43,7 @@ mlkem: \
$(MLKEM768_DIR)/bin/test_mlkem768 \
$(MLKEM1024_DIR)/bin/test_mlkem1024

# Enforce setting CYCLES make variable when
# Enforce setting CYCLES make variable when
# building benchmarking binaries
check_defined = $(if $(value $1),, $(error $2))
check-defined-CYCLES:
Expand Down
140 changes: 30 additions & 110 deletions scripts/lib/mlkem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,133 +447,53 @@ def _kat(opt):
if fail:
exit(1)

def _run_acvp(self, opt, acvp_dir="test/acvp_data"):
acvp_keygen_json = f"{acvp_dir}/acvp_keygen_internalProjection.json"
acvp_encapDecap_json = f"{acvp_dir}/acvp_encapDecap_internalProjection.json"

with open(acvp_keygen_json, "r") as f:
acvp_keygen_data = json.load(f)

with open(acvp_encapDecap_json, "r") as f:
acvp_encapDecap_data = json.load(f)

def _check_proc(tc, scheme, raw):
"""Checks whether the ACVP result is as expected"""
actual = raw.decode("utf-8")
fail = False
err = ""
for l in actual.splitlines():
(k, v) = l.split("=")
if v != tc[k]:
fail = True
err = (
err
+ f"Failed, Mismatching result for {k}: expect {tc[k]}, but got {v}\n"
)
return (fail, err)
def _run_acvp(self, opt):

opt_label = "opt" if opt else "no_opt"
log = logger(TEST_TYPES.ACVP, "Run", self._acvp.ts[opt_label].cross_prefix, opt)

def init_results():
results = {}
results[opt_label] = {}
for s in SCHEME:
results[opt_label][s] = False
return results

fail = False
results = init_results()
# encapDecap
if gh_env is not None:
print(
f"::group::run {self.compile_mode} {opt_label} {TEST_TYPES.ACVP.desc()} encapDecap"
f"::group::run {self.compile_mode} {opt_label} {TEST_TYPES.ACVP.desc()}"
)

for i, tg in enumerate(acvp_encapDecap_data["testGroups"]):
scheme = SCHEME.from_str(tg["parameterSet"])

for tc in tg["tests"]:
if tg["function"] == "encapsulation":
extra_args = [
"encapDecap",
"AFT",
"encapsulation",
f"ek={tc['ek']}",
f"m={tc['m']}",
]

elif tg["function"] == "decapsulation":
extra_args = [
"encapDecap",
"VAL",
"decapsulation",
f"dk={tg['dk']}",
f"c={tc['c']}",
]

rs = self._acvp.run_scheme(
opt,
scheme,
extra_args=extra_args,
check_proc=partial(_check_proc, tc),
cmd_prefix=self.cmd_prefix,
)
for k, r in rs.items():
results[k][scheme] = results[k][scheme] or r[scheme]

if gh_env is not None:
print(f"::endgroup::")

for k, result in results.items():
title = (
"## " + (self._acvp.compile_mode) + " " + (k.capitalize()) + " Tests"
)
github_summary(title, f"{TEST_TYPES.ACVP.desc()} encapDecap", result)

fail = reduce(lambda acc, c: acc or c, result.values(), fail)

results = init_results()
env_update = {"EXEC_WRAPPER": " ".join(self.cmd_prefix)}
env = os.environ.copy()
env.update(env_update)

if gh_env is not None:
print(
f"::group::run {self.compile_mode} {opt_label} {TEST_TYPES.ACVP.desc()} keyGen"
)
def dict2str(dict):
s = ""
for k, v in dict.items():
s += f"{k}={v} "
return s

for i, tg in enumerate(acvp_keygen_data["testGroups"]):
scheme = SCHEME.from_str(tg["parameterSet"])
args = ["make", "check_acvp"]
log.info(dict2str(env_update) + " ".join(args))

for tc in tg["tests"]:
extra_args = [
"keyGen",
"AFT",
f"z={tc['z']}",
f"d={tc['d']}",
]
p = subprocess.run(
args,
capture_output=True,
universal_newlines=False,
env=env,
)
fail = p.returncode != 0
if fail is True:
log.error(p.stderr.decode())
log.error(f"ACVP test failed: {p.returncode}")

rs = self._acvp.run_scheme(
opt,
scheme,
extra_args=extra_args,
check_proc=partial(_check_proc, tc),
cmd_prefix=self.cmd_prefix,
)
for k, r in rs.items():
results[k][scheme] = results[k][scheme] or r[scheme]
results = {}
results[opt_label] = {}
for s in SCHEME:
results[opt_label][s] = fail

if gh_env is not None:
print(f"::endgroup::")

for k, result in results.items():
title = (
"## "
+ (self._acvp.ts[k].compile_mode)
+ " "
+ (k.capitalize())
+ " Tests"
"## " + (self._acvp.compile_mode) + " " + (k.capitalize()) + " Tests"
)
github_summary(title, f"{TEST_TYPES.ACVP.desc()} keyGen", result)

fail = reduce(lambda acc, c: acc or c, result.values(), fail)
github_summary(title, f"{TEST_TYPES.ACVP.desc()}", result)

return fail

Expand All @@ -584,7 +504,7 @@ def _acvp(opt):
if self.compile:
self._acvp.compile(opt)
if self.run:
return self._run_acvp(opt, acvp_dir)
return self._run_acvp(opt)

fail = False

Expand Down
66 changes: 43 additions & 23 deletions test/acvp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@
#
# Invokes `acvp_mlkem{lvl}` under the hood.

import os
import json
import sys
import subprocess

# Check if we need to use a wrapper for execution (e.g. QEMU)
exec_prefix = os.environ.get("EXEC_WRAPPER", "")
exec_prefix = [exec_prefix] if exec_prefix != "" else []

acvp_dir = "test/acvp_data"
acvp_keygen_json = f"{acvp_dir}/acvp_keygen_internalProjection.json"
acvp_encapDecap_json = f"{acvp_dir}/acvp_encapDecap_internalProjection.json"
Expand All @@ -22,6 +28,14 @@
acvp_encapDecap_data = json.load(f)


def err(msg, **kwargs):
print(msg, file=sys.stderr, **kwargs)


def info(msg, **kwargs):
print(msg, **kwargs)


def get_acvp_binary(tg):
"""Convert JSON dict for ACVP test group to suitable ACVP binary."""
parameterSetToLevel = {
Expand All @@ -36,10 +50,10 @@ def get_acvp_binary(tg):


def run_encapDecap_test(tg, tc):
print(f"Running encapDecap test case {tc['tcId']} ({tg['function']}) ... ", end="")
info(f"Running encapDecap test case {tc['tcId']} ({tg['function']}) ... ", end="")
if tg["function"] == "encapsulation":
acvp_bin = get_acvp_binary(tg)
acvp_call = [
acvp_call = exec_prefix + [
acvp_bin,
"encapDecap",
"AFT",
Expand All @@ -49,21 +63,21 @@ def run_encapDecap_test(tg, tc):
]
result = subprocess.run(acvp_call, encoding="utf-8", capture_output=True)
if result.returncode != 0:
print("FAIL!")
print(f"{acvp_call} failed with error code {result.returncode}")
print(result.stderr)
err("FAIL!")
err(f"{acvp_call} failed with error code {result.returncode}")
err(result.stderr)
exit(1)
# Extract results and compare to expected data
for l in result.stdout.splitlines():
(k, v) = l.split("=")
if v != tc[k]:
print("FAIL!")
print(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
err("FAIL!")
err(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
exit(1)
print("OK")
info("OK")
elif tg["function"] == "decapsulation":
acvp_bin = get_acvp_binary(tg)
acvp_call = [
acvp_call = exec_prefix + [
acvp_bin,
"encapDecap",
"VAL",
Expand All @@ -73,38 +87,44 @@ def run_encapDecap_test(tg, tc):
]
result = subprocess.run(acvp_call, encoding="utf-8", capture_output=True)
if result.returncode != 0:
print("FAIL!")
print(f"{acvp_call} failed with error code {result.returncode}")
print(result.stderr)
err("FAIL!")
err(f"{acvp_call} failed with error code {result.returncode}")
err(result.stderr)
exit(1)
# Extract results and compare to expected data
for l in result.stdout.splitlines():
(k, v) = l.split("=")
if v != tc[k]:
print("FAIL!")
print(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
err("FAIL!")
err(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
exit(1)
print("OK")
info("OK")


def run_keyGen_test(tg, tc):
print(f"Running keyGen test case {tc['tcId']} ... ", end="")
info(f"Running keyGen test case {tc['tcId']} ... ", end="")
acvp_bin = get_acvp_binary(tg)
acvp_call = [acvp_bin, "keyGen", "AFT", f"z={tc['z']}", f"d={tc['d']}"]
acvp_call = exec_prefix + [
acvp_bin,
"keyGen",
"AFT",
f"z={tc['z']}",
f"d={tc['d']}",
]
result = subprocess.run(acvp_call, encoding="utf-8", capture_output=True)
if result.returncode != 0:
print("FAIL!")
print(f"{acvp_call} failed with error code {result.returncode}")
print(result.stderr)
err("FAIL!")
err(f"{acvp_call} failed with error code {result.returncode}")
err(result.stderr)
exit(1)
# Extract results and compare to expected data
for l in result.stdout.splitlines():
(k, v) = l.split("=")
if v != tc[k]:
print("FAIL!")
print(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
err("FAIL!")
err(f"Mismatching result for {k}: expected {tc[k]}, got {v}")
exit(1)
print("OK")
info("OK")


for tg in acvp_encapDecap_data["testGroups"]:
Expand Down

18 comments on commit 169a6c3

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 29020 cycles 29019 cycles 1.00
ML-KEM-512 encaps 35398 cycles 35397 cycles 1.00
ML-KEM-512 decaps 45886 cycles 45884 cycles 1.00
ML-KEM-768 keypair 49348 cycles 49351 cycles 1.00
ML-KEM-768 encaps 55571 cycles 55575 cycles 1.00
ML-KEM-768 decaps 70329 cycles 70334 cycles 1.00
ML-KEM-1024 keypair 72075 cycles 72072 cycles 1.00
ML-KEM-1024 encaps 80847 cycles 80841 cycles 1.00
ML-KEM-1024 decaps 100681 cycles 100675 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 13540 cycles 13527 cycles 1.00
ML-KEM-512 encaps 17373 cycles 17277 cycles 1.01
ML-KEM-512 decaps 22944 cycles 22790 cycles 1.01
ML-KEM-768 keypair 22553 cycles 22504 cycles 1.00
ML-KEM-768 encaps 24621 cycles 24471 cycles 1.01
ML-KEM-768 decaps 32674 cycles 32452 cycles 1.01
ML-KEM-1024 keypair 31432 cycles 31376 cycles 1.00
ML-KEM-1024 encaps 34946 cycles 34960 cycles 1.00
ML-KEM-1024 decaps 45851 cycles 45909 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 18127 cycles 18126 cycles 1.00
ML-KEM-512 encaps 23185 cycles 23183 cycles 1.00
ML-KEM-512 decaps 30507 cycles 30491 cycles 1.00
ML-KEM-768 keypair 31071 cycles 31063 cycles 1.00
ML-KEM-768 encaps 34169 cycles 34173 cycles 1.00
ML-KEM-768 decaps 44724 cycles 44728 cycles 1.00
ML-KEM-1024 keypair 44607 cycles 44882 cycles 0.99
ML-KEM-1024 encaps 49891 cycles 50129 cycles 1.00
ML-KEM-1024 decaps 64348 cycles 64397 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 15077 cycles 15081 cycles 1.00
ML-KEM-512 encaps 19664 cycles 19919 cycles 0.99
ML-KEM-512 decaps 26317 cycles 26318 cycles 1.00
ML-KEM-768 keypair 25547 cycles 25626 cycles 1.00
ML-KEM-768 encaps 28119 cycles 28172 cycles 1.00
ML-KEM-768 decaps 37839 cycles 37875 cycles 1.00
ML-KEM-1024 keypair 35583 cycles 35758 cycles 1.00
ML-KEM-1024 encaps 40970 cycles 41107 cycles 1.00
ML-KEM-1024 decaps 54481 cycles 54508 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 20332 cycles 20337 cycles 1.00
ML-KEM-512 encaps 27009 cycles 27002 cycles 1.00
ML-KEM-512 decaps 35816 cycles 35851 cycles 1.00
ML-KEM-768 keypair 34890 cycles 34903 cycles 1.00
ML-KEM-768 encaps 38186 cycles 38208 cycles 1.00
ML-KEM-768 decaps 50935 cycles 50964 cycles 1.00
ML-KEM-1024 keypair 47973 cycles 47945 cycles 1.00
ML-KEM-1024 encaps 54150 cycles 54152 cycles 1.00
ML-KEM-1024 decaps 71716 cycles 71696 cycles 1.00

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

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton4

Benchmark suite Current: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 18141 cycles 18136 cycles 1.00
ML-KEM-512 encaps 22155 cycles 22154 cycles 1.00
ML-KEM-512 decaps 28789 cycles 28791 cycles 1.00
ML-KEM-768 keypair 30569 cycles 30573 cycles 1.00
ML-KEM-768 encaps 33637 cycles 33636 cycles 1.00
ML-KEM-768 decaps 43176 cycles 43174 cycles 1.00
ML-KEM-1024 keypair 44211 cycles 44214 cycles 1.00
ML-KEM-1024 encaps 49661 cycles 49658 cycles 1.00
ML-KEM-1024 decaps 62655 cycles 62658 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 34805 cycles 34892 cycles 1.00
ML-KEM-512 encaps 44977 cycles 45125 cycles 1.00
ML-KEM-512 decaps 58905 cycles 59050 cycles 1.00
ML-KEM-768 keypair 59222 cycles 59155 cycles 1.00
ML-KEM-768 encaps 71873 cycles 71781 cycles 1.00
ML-KEM-768 decaps 89330 cycles 89277 cycles 1.00
ML-KEM-1024 keypair 87365 cycles 87519 cycles 1.00
ML-KEM-1024 encaps 104579 cycles 104619 cycles 1.00
ML-KEM-1024 decaps 127566 cycles 127703 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 45731 cycles 45735 cycles 1.00
ML-KEM-512 encaps 56878 cycles 56864 cycles 1.00
ML-KEM-512 decaps 76270 cycles 76274 cycles 1.00
ML-KEM-768 keypair 74568 cycles 74510 cycles 1.00
ML-KEM-768 encaps 88637 cycles 88559 cycles 1.00
ML-KEM-768 decaps 114477 cycles 114406 cycles 1.00
ML-KEM-1024 keypair 109427 cycles 109367 cycles 1.00
ML-KEM-1024 encaps 127513 cycles 127417 cycles 1.00
ML-KEM-1024 decaps 160121 cycles 159996 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 52178 cycles 52144 cycles 1.00
ML-KEM-512 encaps 65771 cycles 65749 cycles 1.00
ML-KEM-512 decaps 88404 cycles 88365 cycles 1.00
ML-KEM-768 keypair 84745 cycles 84776 cycles 1.00
ML-KEM-768 encaps 101806 cycles 101446 cycles 1.00
ML-KEM-768 decaps 132081 cycles 132046 cycles 1.00
ML-KEM-1024 keypair 124039 cycles 123981 cycles 1.00
ML-KEM-1024 encaps 145723 cycles 145667 cycles 1.00
ML-KEM-1024 decaps 183725 cycles 183563 cycles 1.00

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

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton2

Benchmark suite Current: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 29021 cycles 29020 cycles 1.00
ML-KEM-512 encaps 35399 cycles 35402 cycles 1.00
ML-KEM-512 decaps 45885 cycles 45887 cycles 1.00
ML-KEM-768 keypair 49361 cycles 49402 cycles 1.00
ML-KEM-768 encaps 55579 cycles 55644 cycles 1.00
ML-KEM-768 decaps 70297 cycles 70400 cycles 1.00
ML-KEM-1024 keypair 72009 cycles 72012 cycles 1.00
ML-KEM-1024 encaps 80789 cycles 80789 cycles 1
ML-KEM-1024 decaps 100661 cycles 100656 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 56624 cycles 56570 cycles 1.00
ML-KEM-512 encaps 69431 cycles 69407 cycles 1.00
ML-KEM-512 decaps 91368 cycles 91357 cycles 1.00
ML-KEM-768 keypair 91844 cycles 91889 cycles 1.00
ML-KEM-768 encaps 107860 cycles 107840 cycles 1.00
ML-KEM-768 decaps 136350 cycles 136362 cycles 1.00
ML-KEM-1024 keypair 134716 cycles 134781 cycles 1.00
ML-KEM-1024 encaps 155141 cycles 155260 cycles 1.00
ML-KEM-1024 decaps 191643 cycles 191523 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 58368 cycles 58364 cycles 1.00
ML-KEM-512 encaps 65797 cycles 65784 cycles 1.00
ML-KEM-512 decaps 84531 cycles 84548 cycles 1.00
ML-KEM-768 keypair 98990 cycles 98912 cycles 1.00
ML-KEM-768 encaps 110464 cycles 110226 cycles 1.00
ML-KEM-768 decaps 136532 cycles 137095 cycles 1.00
ML-KEM-1024 keypair 150179 cycles 150149 cycles 1.00
ML-KEM-1024 encaps 166330 cycles 166281 cycles 1.00
ML-KEM-1024 decaps 202544 cycles 202259 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 41978 cycles 41980 cycles 1.00
ML-KEM-512 encaps 50165 cycles 50156 cycles 1.00
ML-KEM-512 decaps 66057 cycles 66048 cycles 1.00
ML-KEM-768 keypair 69055 cycles 69051 cycles 1.00
ML-KEM-768 encaps 79759 cycles 79760 cycles 1.00
ML-KEM-768 decaps 101017 cycles 101011 cycles 1.00
ML-KEM-1024 keypair 102205 cycles 102209 cycles 1.00
ML-KEM-1024 encaps 117195 cycles 117193 cycles 1.00
ML-KEM-1024 decaps 143699 cycles 143703 cycles 1.00

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

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton3

Benchmark suite Current: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 18965 cycles 18968 cycles 1.00
ML-KEM-512 encaps 23553 cycles 23557 cycles 1.00
ML-KEM-512 decaps 30665 cycles 30666 cycles 1.00
ML-KEM-768 keypair 32294 cycles 32294 cycles 1
ML-KEM-768 encaps 35891 cycles 35884 cycles 1.00
ML-KEM-768 decaps 46046 cycles 46026 cycles 1.00
ML-KEM-1024 keypair 46629 cycles 46628 cycles 1.00
ML-KEM-1024 encaps 52444 cycles 52447 cycles 1.00
ML-KEM-1024 decaps 66247 cycles 66248 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 71258 cycles 71253 cycles 1.00
ML-KEM-512 encaps 85064 cycles 85054 cycles 1.00
ML-KEM-512 decaps 112745 cycles 112737 cycles 1.00
ML-KEM-768 keypair 117665 cycles 117664 cycles 1.00
ML-KEM-768 encaps 135333 cycles 135324 cycles 1.00
ML-KEM-768 decaps 171948 cycles 171956 cycles 1.00
ML-KEM-1024 keypair 175207 cycles 174763 cycles 1.00
ML-KEM-1024 encaps 197231 cycles 196905 cycles 1.00
ML-KEM-1024 decaps 243461 cycles 243058 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 45388 cycles 45392 cycles 1.00
ML-KEM-512 encaps 54215 cycles 54217 cycles 1.00
ML-KEM-512 decaps 71153 cycles 71150 cycles 1.00
ML-KEM-768 keypair 74828 cycles 74823 cycles 1.00
ML-KEM-768 encaps 86062 cycles 86059 cycles 1.00
ML-KEM-768 decaps 108808 cycles 108802 cycles 1.00
ML-KEM-1024 keypair 111124 cycles 111129 cycles 1.00
ML-KEM-1024 encaps 125924 cycles 125930 cycles 1.00
ML-KEM-1024 decaps 154614 cycles 154627 cycles 1.00

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

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Bananapi bpi-f3 benchmarks

Benchmark suite Current: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 335043 cycles 335164 cycles 1.00
ML-KEM-512 encaps 445693 cycles 445882 cycles 1.00
ML-KEM-512 decaps 593768 cycles 593973 cycles 1.00
ML-KEM-768 keypair 556100 cycles 556332 cycles 1.00
ML-KEM-768 encaps 697883 cycles 698191 cycles 1.00
ML-KEM-768 decaps 889605 cycles 889951 cycles 1.00
ML-KEM-1024 keypair 821199 cycles 821702 cycles 1.00
ML-KEM-1024 encaps 998090 cycles 998669 cycles 1.00
ML-KEM-1024 decaps 1230182 cycles 1230945 cycles 1.00

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

@oqs-bot
Copy link

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: 169a6c3 Previous: 13ca898 Ratio
ML-KEM-512 keypair 52125 cycles 51885 cycles 1.00
ML-KEM-512 encaps 58732 cycles 58387 cycles 1.01
ML-KEM-512 decaps 74611 cycles 74346 cycles 1.00
ML-KEM-768 keypair 87684 cycles 87995 cycles 1.00
ML-KEM-768 encaps 96005 cycles 96550 cycles 0.99
ML-KEM-768 decaps 120180 cycles 120075 cycles 1.00
ML-KEM-1024 keypair 132237 cycles 131672 cycles 1.00
ML-KEM-1024 encaps 145035 cycles 144604 cycles 1.00
ML-KEM-1024 decaps 176330 cycles 175365 cycles 1.01

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

Please sign in to comment.