Skip to content

Commit

Permalink
Update schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwiggers committed Oct 16, 2023
1 parent 2c2469d commit cfe44a1
Show file tree
Hide file tree
Showing 76 changed files with 1,479 additions and 22,546 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 2023-10-16

* Update Kyber to draft FIPS standard
* Update Dilithium to draft FIPS standard
* Update McEliece implementation
* Small fix in Falcon
* Add Falcon NEON implementation

## 2023-04-26

* Update Rust dependencies
* Update SPHINCS+ implementation
* Update Falcon implementation
Expand Down
104 changes: 22 additions & 82 deletions implementations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,55 @@ kems:
implementations: [clean, avx2, aarch64]
- name: kyber1024
implementations: [clean, avx2, aarch64]
- name: kyber512-90s
implementations: [clean, avx2]
- name: kyber768-90s
implementations: [clean, avx2]
- name: kyber1024-90s
implementations: [clean, avx2]
classicmceliece:
version: 0.1.8
version: 0.2.0
notes: |
This implementation requires a lot of stack space.
You need to specify ``RUST_MIN_STACK=800000000``, probably.
x86_avx2_guard: 'target_arch == "x86_64" && avx2_enabled && !is_windows'
implementations: [vec, clean, avx]
implementations: [clean, avx]
schemes:
- name: mceliece348864
implementations: [vec, clean, avx]
implementations: [clean, avx]
- name: mceliece348864f
implementations: [vec, clean, avx]
implementations: [clean, avx]
- name: mceliece460896
implementations: [vec, clean, avx]
implementations: [clean, avx]
- name: mceliece460896f
implementations: [vec, clean, avx]
implementations: [clean, avx]
- name: mceliece6688128
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
- name: mceliece6688128f
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
- name: mceliece6960119
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
- name: mceliece6960119f
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
- name: mceliece8192128
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
- name: mceliece8192128f
implementations: [vec, clean, avx]
implementations: [clean, avx]
doctest: no
hqc:
version: 0.1.7
version: 0.2.0
implementations: [clean]
schemes:
- name: hqc-rmrs-128
implementations: [clean] # avx2 is excluded
- name: hqc-rmrs-192
implementations: [clean] # avx2 is excluded
- name: hqc-rmrs-256
implementations: [clean] # avx2 is excluded
- name: hqc-128
implementations: [clean]
- name: hqc-192
implementations: [clean]
- name: hqc-256
implementations: [clean]


signs:
dilithium:
version: 0.4.7
version: 0.5.0
x86_avx2_guard: 'target_arch == "x86_64" && avx2_enabled && !is_windows'
implementations: [clean, avx2, aarch64]
schemes:
Expand All @@ -79,94 +73,40 @@ signs:
implementations: [clean, avx2, aarch64]
- name: dilithium5
implementations: [clean, avx2, aarch64]
- name: dilithium2aes
implementations: [clean, avx2]
- name: dilithium3aes
implementations: [clean, avx2]
- name: dilithium5aes
implementations: [clean, avx2]
falcon:
version: 0.3.0
implementations: [clean, avx2]
schemes:
- name: falcon-512
implementations: [clean, avx2]
implementations: [clean, avx2, aarch64]
- name: falcon-1024
implementations: [clean, avx2]
implementations: [clean, avx2, aarch64]
sphincsplus:
version: 0.7.0
implementations: [clean, aesni, avx2]
schemes:
- name: sphincs-haraka-128f-robust
implementations: [clean, aesni]
- name: sphincs-haraka-128f-simple
implementations: [clean, aesni]
- name: sphincs-haraka-128s-robust
implementations: [clean, aesni]
- name: sphincs-haraka-128s-simple
implementations: [clean, aesni]
- name: sphincs-haraka-192f-robust
implementations: [clean, aesni]
- name: sphincs-haraka-192f-simple
implementations: [clean, aesni]
- name: sphincs-haraka-192s-robust
implementations: [clean, aesni]
- name: sphincs-haraka-192s-simple
implementations: [clean, aesni]
- name: sphincs-haraka-256f-robust
implementations: [clean, aesni]
- name: sphincs-haraka-256f-simple
implementations: [clean, aesni]
- name: sphincs-haraka-256s-robust
implementations: [clean, aesni]
- name: sphincs-haraka-256s-simple
implementations: [clean, aesni]
- name: sphincs-shake-128f-robust
implementations: [clean, avx2]
- name: sphincs-shake-128f-simple
implementations: [clean, avx2]
- name: sphincs-shake-128s-robust
implementations: [clean, avx2]
- name: sphincs-shake-128s-simple
implementations: [clean, avx2]
- name: sphincs-shake-192f-robust
implementations: [clean, avx2]
- name: sphincs-shake-192f-simple
implementations: [clean, avx2]
- name: sphincs-shake-192s-robust
implementations: [clean, avx2]
- name: sphincs-shake-192s-simple
implementations: [clean, avx2]
- name: sphincs-shake-256f-robust
implementations: [clean, avx2]
- name: sphincs-shake-256f-simple
implementations: [clean, avx2]
- name: sphincs-shake-256s-robust
implementations: [clean, avx2]
- name: sphincs-shake-256s-simple
implementations: [clean, avx2]
- name: sphincs-sha2-128f-robust
implementations: [clean, avx2]
- name: sphincs-sha2-128f-simple
implementations: [clean, avx2]
- name: sphincs-sha2-128s-robust
implementations: [clean, avx2]
- name: sphincs-sha2-128s-simple
implementations: [clean, avx2]
- name: sphincs-sha2-192f-robust
implementations: [clean, avx2]
- name: sphincs-sha2-192f-simple
implementations: [clean, avx2]
- name: sphincs-sha2-192s-robust
implementations: [clean, avx2]
- name: sphincs-sha2-192s-simple
implementations: [clean, avx2]
- name: sphincs-sha2-256f-robust
implementations: [clean, avx2]
- name: sphincs-sha2-256f-simple
implementations: [clean, avx2]
- name: sphincs-sha2-256s-robust
implementations: [clean, avx2]
- name: sphincs-sha2-256s-simple
implementations: [clean, avx2]

Expand Down
2 changes: 1 addition & 1 deletion pqclean
Submodule pqclean updated 5761 files
2 changes: 1 addition & 1 deletion pqcrypto-classicmceliece/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pqcrypto-classicmceliece"
description = "Post-Quantum Key-Encapsulation Mechanism classicmceliece"
readme = "README.md"
version = "0.1.8"
version = "0.2.0"
authors = ["Thom Wiggers <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
10 changes: 0 additions & 10 deletions pqcrypto-classicmceliece/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,33 @@ Rust-friendly interface, alternative implementations are exposed as ``ffi``
methods only.

* ``mceliece348864``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece348864f``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece460896``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece460896f``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece6688128``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece6688128f``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece6960119``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece6960119f``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece8192128``
* ``vec``
* ``clean``
* ``avx`` (if supported)
* ``mceliece8192128f``
* ``vec``
* ``clean``
* ``avx`` (if supported)

Expand Down
40 changes: 0 additions & 40 deletions pqcrypto-classicmceliece/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,6 @@ extern crate glob;
use std::env;
use std::path::{Path, PathBuf};

macro_rules! build_vec {
($variant:expr) => {
let internals_include_path = &std::env::var("DEP_PQCRYPTO_INTERNALS_INCLUDEPATH").unwrap();
let common_dir = Path::new("pqclean/common");

let mut builder = cc::Build::new();
let target_dir: PathBuf = ["pqclean", "crypto_kem", $variant, "vec"].iter().collect();

let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
if target_os == "wasi" {
let wasi_sdk_path =
&std::env::var("WASI_SDK_DIR").expect("missing environment variable: WASI_SDK_DIR");
builder.flag(format!("--sysroot={}", wasi_sdk_path).as_str());
}

let scheme_files = glob::glob(target_dir.join("*.c").to_str().unwrap()).unwrap();

builder
.include(internals_include_path)
.include(&common_dir)
.include(target_dir)
.files(
scheme_files
.into_iter()
.map(|p| p.unwrap().to_string_lossy().into_owned()),
);
builder.compile(format!("{}_vec", $variant).as_str());
};
}

macro_rules! build_clean {
($variant:expr) => {
let internals_include_path = &std::env::var("DEP_PQCRYPTO_INTERNALS_INCLUDEPATH").unwrap();
Expand Down Expand Up @@ -124,52 +94,42 @@ fn main() {
#[allow(unused_variables)]
let is_macos = target_os == "macos";

build_vec!("mceliece348864");
build_clean!("mceliece348864");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece348864");
}
build_vec!("mceliece348864f");
build_clean!("mceliece348864f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece348864f");
}
build_vec!("mceliece460896");
build_clean!("mceliece460896");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece460896");
}
build_vec!("mceliece460896f");
build_clean!("mceliece460896f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece460896f");
}
build_vec!("mceliece6688128");
build_clean!("mceliece6688128");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6688128");
}
build_vec!("mceliece6688128f");
build_clean!("mceliece6688128f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6688128f");
}
build_vec!("mceliece6960119");
build_clean!("mceliece6960119");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6960119");
}
build_vec!("mceliece6960119f");
build_clean!("mceliece6960119f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece6960119f");
}
build_vec!("mceliece8192128");
build_clean!("mceliece8192128");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece8192128");
}
build_vec!("mceliece8192128f");
build_clean!("mceliece8192128f");
if target_arch == "x86_64" && avx2_enabled && !is_windows {
build_avx!("mceliece8192128f");
Expand Down
Loading

0 comments on commit cfe44a1

Please sign in to comment.