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
#!/bin/bash | |
# System update | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Install system development tools | |
sudo apt-get install build-essential -y | |
sudo apt-get install cmake -y |
diff --git a/demo_rc4ok.c b/demo_rc4ok.c | |
index 72abbb1..968c191 100644 | |
--- a/demo_rc4ok.c | |
+++ b/demo_rc4ok.c | |
@@ -3,7 +3,7 @@ | |
#include <pthread.h> | |
#include <stdlib.h> | |
#include <string.h> | |
-#include <rc4ok.h> | |
+#include "rc4ok.h" |
diff --git a/ReferenceCode/Multimixer-128.py b/ReferenceCode/Multimixer-128.py | |
index 2f9b11e..54cb0a6 100644 | |
--- a/ReferenceCode/Multimixer-128.py | |
+++ b/ReferenceCode/Multimixer-128.py | |
@@ -96,9 +96,70 @@ def Int_multimix(M,K): | |
#256 = block size of Multimixer-128 | |
-l = int(input("Enter message Length: ")) | |
+def gen_rand_bytes(l: int) -> bytes: |
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 |
#!/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 | |
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 |
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
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/[email protected]/include -L/usr/local/opt/[email protected]/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) { |