-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
2,186 additions
and
5,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
workspace = { exclude = ["ct_cm4", "dudect", "fuzz", "wasm"] } | ||
|
||
[package] | ||
name = "fips204" | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
description = "FIPS 204 (draft): Module-Lattice-Based Digital Signature" | ||
authors = ["Eric Schorn <[email protected]>"] | ||
documentation = "https://docs.rs/fips204" | ||
categories = ["cryptography", "no-std"] | ||
repository = "https://github.com/integritychain/fips204" | ||
keywords = ["FIPS204", "lattice", "signature"] | ||
keywords = ["FIPS204", "lattice", "dilithium", "signature"] | ||
# MSRV set at 1.70 for debian testing, e.g. https://packages.debian.org/search?keywords=rustc | ||
# This requires several marginally outdated dependencies, see below | ||
rust-version = "1.70" | ||
|
@@ -23,18 +25,18 @@ ml-dsa-87 = [] | |
dudect = [] | ||
|
||
|
||
[dependencies] | ||
[dependencies] # Some are marginally held-back to retain MSRV 1.70 | ||
rand_core = { version = "0.6.4", default-features = false } | ||
sha3 = { version = "0.10.2", default-features = false } | ||
zeroize = { version = "1.6.0", default-features = false, features = ["zeroize_derive"] } | ||
|
||
|
||
[dev-dependencies] | ||
[dev-dependencies] # Some are marginally held-back to retain MSRV 1.70 | ||
rand = "0.8.5" | ||
regex = "1.10.2" | ||
hex = "0.4.3" | ||
rand_chacha = "0.3.1" | ||
criterion = "0.4.0" # 0.4.0 needed to keep MSRV back at 1.70, newer: "0.5.1" | ||
criterion = "0.4.0" | ||
|
||
|
||
[[bench]] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
#[target.thumbv7em-none-eabihf] | ||
#runner = "gdb-multiarch -q -x openocd.gdb" | ||
#rustflags = ["-C", "link-arg=-Tlink.x"] | ||
|
||
[target.'cfg(all(target_arch = "arm", target_os = "none"))'] | ||
rustflags = [ | ||
"-C", "link-arg=-Tlink.x", | ||
] | ||
[target.thumbv7em-none-eabihf] | ||
runner = "gdb-multiarch -q -x openocd.gdb" | ||
rustflags = ["-C", "link-arg=-Tlink.x"] | ||
|
||
[build] | ||
target = "thumbv7em-none-eabihf" | ||
target = "thumbv7em-none-eabihf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[package] | ||
name = "fips204-ct_cm4" | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
license = "MIT OR Apache-2.0" | ||
description = "Cortex-M4 testbench for FIPS 204 (draft) ML-DSA" | ||
authors = ["Eric Schorn <[email protected]>"] | ||
publish = false | ||
edition = "2021" | ||
rust-version = "1.70" | ||
|
||
|
||
[dependencies] | ||
|
@@ -14,7 +15,7 @@ cortex-m = { version = "0.7.7", features = ["critical-section-single-core"]} | |
cortex-m-rt = "0.7.3" | ||
panic-rtt-target = { version = "0.1.2", features = ["cortex-m"] } | ||
microbit-v2 = "0.13.0" | ||
rtt-target = { version = "0.5.0"} #, features = ["cortex-m"] } | ||
rtt-target = { version = "0.5.0"} | ||
rand_core = { version = "0.6.4", default-features = false } | ||
hex-literal = "0.4.1" | ||
|
||
|
@@ -27,4 +28,6 @@ lto = true | |
opt-level = 3 | ||
codegen-units = 1 | ||
|
||
# cargo update -p [email protected] --precise 1.23.1 | ||
|
||
# If cargo complains about 'fixed' on MSRV 1.70, use version 1.23.1 | ||
# cargo update -p [email protected] --precise 1.23.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "fips204-dudect" | ||
version = "0.1.2" | ||
version = "0.2.0" | ||
authors = ["Eric Schorn <[email protected]>"] | ||
publish = false | ||
edition = "2021" | ||
|
@@ -9,7 +9,7 @@ rust-version = "1.70" | |
|
||
|
||
[dependencies] | ||
fips204 = { path = "..", features = ["dudect"] } | ||
fips204 = { path = "..", default-features = false, features = ["dudect", "ml-dsa-44"] } | ||
dudect-bencher = "0.6" | ||
rand_core = { version = "0.6.4", default-features = false } | ||
|
||
|
@@ -25,7 +25,7 @@ codegen-units = 1 | |
|
||
|
||
[profile.release] | ||
debug = false #true | ||
debug = true | ||
debug-assertions = false | ||
incremental = false | ||
lto = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
This is a simple WASM demo for the FIPS 204 code. | ||
|
||
|
||
One-off installation | ||
1. One-off installation | ||
|
||
~~~ | ||
$ cargo install wasm-pack | ||
$ sudo npm install npm@latest -g | ||
~~~ | ||
~~~ | ||
$ cargo install wasm-pack | ||
$ <install Node.js if not already installed> | ||
$ sudo apt install npm | ||
~~~ | ||
|
||
To run: | ||
2. To run the demo: | ||
|
||
~~~ | ||
$ cd wasm # this directory | ||
$ wasm-pack build | ||
$ cd www | ||
$ npm install | ||
$ export NODE_OPTIONS=--openssl-legacy-provider | ||
$ npm run start | ||
~~~ | ||
~~~ | ||
$ cd wasm # this directory | ||
$ wasm-pack build | ||
$ cd www | ||
$ npm install | ||
$ export NODE_OPTIONS=--openssl-legacy-provider | ||
$ npm run start | ||
browse http://localhost:8080/ | ||
~~~ | ||
|
||
If the final step fails on newer Node.js versions, try preceding | ||
it with: $ export NODE_OPTIONS=--openssl-legacy-provider. |
Oops, something went wrong.