Background
I'm demonstrating following on a machine, running Ubuntu 22.04 with GNU/Linux kernel 5.19.0.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
diff --git a/FrodoKEM/python3/frodokem.py b/FrodoKEM/python3/frodokem.py | |
index 731cb0e..c701108 100644 | |
--- a/FrodoKEM/python3/frodokem.py | |
+++ b/FrodoKEM/python3/frodokem.py | |
@@ -4,6 +4,7 @@ | |
import bitstring | |
import math | |
+import sys | |
import secrets |
diff --git a/Reference_Implementation_KEM/Makefile b/Reference_Implementation_KEM/Makefile | |
index 7608e07..adfda63 100644 | |
--- a/Reference_Implementation_KEM/Makefile | |
+++ b/Reference_Implementation_KEM/Makefile | |
@@ -14,13 +14,13 @@ SOURCES = pack_unpack.c poly.c fips202.c verify.c cbd.c SABER_indcpa.c kem.c | |
HEADERS = SABER_params.h pack_unpack.h poly.h rng.h fips202.h verify.h cbd.h SABER_indcpa.h | |
test/test_kex: $(SOURCES) $(HEADERS) rng.o test/test_kex.c | |
- $(CC) $(CFLAGS) -o $@ $(SOURCES) rng.o test/test_kex.c -lcrypto | |
+ $(CC) $(CFLAGS) -o $@ -DSABER_L=$(SABER_L) $(SOURCES) rng.o test/test_kex.c -lcrypto |
#version 450 | |
#pragma shader_stage(compute) | |
layout(local_size_x = 8, local_size_y = 4, local_size_z = 1) in; | |
layout(set = 0, binding = 0) buffer readonly MatrixA { | |
int[1<<20] matrix_a; | |
}; | |
layout(set = 0, binding = 1) buffer readonly MatrixB { |
I'm demonstrating following on a machine, running Ubuntu 22.04 with GNU/Linux kernel 5.19.0.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
#!/usr/bin/python | |
import random | |
import hashlib | |
MIN_MSG_LEN = 0 # minimum input message byte length | |
MAX_MSG_LEN = 1024 # maximum input message byte length | |
SQUEEZED_LEN = 256 # number of bytes squeezed from Xof | |
This gist holds steps for generating Known Answer Tests from Xoofff's reference C++ implementation ( more @ https://github.com/KeccakTeam/Xoodoo.git ), by applying following git patch s.t. these KATs can be used for ensuring functional correctness of my Rust library implementation of Xoofff ( more @ https://github.com/itzmeanjan/xoofff ).
git clone https://github.com/KeccakTeam/Xoodoo.git
numpy==1.20.3 | |
galois==0.0.17 |
diff --git a/ref/Makefile b/ref/Makefile | |
index a3aabad..24c34e1 100644 | |
--- a/ref/Makefile | |
+++ b/ref/Makefile | |
@@ -43,7 +43,7 @@ benchmarks: $(BENCHMARK) | |
benchmark: $(BENCHMARK:=.exec) | |
PQCgenKAT_sign: PQCgenKAT_sign.c $(DET_SOURCES) $(DET_HEADERS) | |
- $(CC) $(CFLAGS) -o $@ $(DET_SOURCES) $< -lcrypto | |
+ $(CC) $(CFLAGS) -o $@ $(DET_SOURCES) -I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib $< -lcrypto |
diff --git a/ref/hex_print.h b/ref/hex_print.h | |
new file mode 100644 | |
index 0000000..7afd872 | |
--- /dev/null | |
+++ b/ref/hex_print.h | |
@@ -0,0 +1,9 @@ | |
+#include <stdio.h> | |
+#include <stdint.h> | |
+ | |
+inline void to_hex(const uint8_t *const bytes, const size_t blen) { |
diff --git a/ref/hex_print.h b/ref/hex_print.h | |
new file mode 100644 | |
index 0000000..7afd872 | |
--- /dev/null | |
+++ b/ref/hex_print.h | |
@@ -0,0 +1,9 @@ | |
+#include <stdio.h> | |
+#include <stdint.h> | |
+ | |
+inline void to_hex(const uint8_t *const bytes, const size_t blen) { |