Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ sphincs-prove:
--proofs_dir $(TARGET_DIR) \
--proof-format cairo-serde \
--verify

sphincs-args:
cd packages/sphincs-plus/scripts && cargo +nightly run --release --example generate_cairo_data \
> ../tests/data/sha2_simple_128s.json
1 change: 1 addition & 0 deletions packages/sphincs-plus/scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
239 changes: 239 additions & 0 deletions packages/sphincs-plus/scripts/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 66 additions & 0 deletions packages/sphincs-plus/scripts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[package]
name = "pqc_sphincsplus"
version = "0.2.0"
edition = "2021"
authors = ["Mitchell Berry <foss@mitchellberry.com>"]
description = "Sphincs+ is a post-quantum signature scheme"
readme = "readme.md"
repository = "https://github.com/Argyle-Software/pqc_sphincsplus"
license = "MIT OR Apache-2.0"
categories = ["algorithms", "cryptography", "no-std"]
keywords = ["sphincsplus", "sphincs+", "sphincs", "signature", "post-quantum"]
exclude = ["tests/KAT/", ".github" ]

[dependencies]
rand = "0.8.5"
sha3 = { version = "0.10.8", optional = true }
hex = "0.4"

# Rename sha2 crate
[dependencies.sha256]
package = "sha2"
version = "0.10.7"
features = ["compress"]
optional = true

[dev-dependencies]
pqc_core = {version = "0.3.0", features = ["load"]}

# Must enable only one from each of the groups below
# otherwise library will throw a compilation error
[features]
default = ["sha2", "s128", "simple"]

### Hash ###
haraka = []
sha2 = ["sha256"]
shake = ["sha3"]

### Security level ###
# Considered equivalent to 128, 192 and 256 bit
# NIST levels 1, 3 & 5 respectively
# Additionally there is a fast signature mode (f)
# and a small signature mode (s)
# See the readme and benchmarks for comparison.
f128 = []
f192 = []
f256 = []
s128 = []
s192 = []
s256 = []

### Tree Hash ###
# SPHINCS+ splits the signatures schemes into a simple and a robust
# variant for each choice of hash function. The robust variant is
# comes with all the conservative security guarantees given in SPHNICS.
# The simple variants are pure random oracle instantiations. These
# instantiations achieve about a factor three speed-up
# compared to the robust counterparts. This comes at the
# cost of a purely heuristic security argument.
simple = []
robust = []

# Exposes inner api methods
# Do not use except for running test vectors
KAT = ["sha2"]

Loading
Loading