-
Notifications
You must be signed in to change notification settings - Fork 15
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
1 parent
7f490c6
commit 46b10c3
Showing
15 changed files
with
3,982 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,134 @@ | ||
name: frodo-kem | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "frodo-kem/**" | ||
- "Cargo.*" | ||
paths-ignore: | ||
- README.md | ||
- SECURITY.md | ||
- LICENSE-Apache | ||
- LICENSE-MIT | ||
push: | ||
branches: master | ||
- "frodo-kem/**" | ||
- "Cargo.*" | ||
paths-ignore: | ||
- README.md | ||
- SECURITY.md | ||
- LICENSE-Apache | ||
- LICENSE-MIT | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_TERM_COLOR: always | ||
RUST_LOG_STYLE: always | ||
RUSTFLAGS: "-Dwarnings" | ||
RUSTDOCFLAGS: "-Dwarnings" | ||
|
||
defaults: | ||
run: | ||
working-directory: frodo-kem | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- run: cargo build | ||
|
||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- run: cargo build --all-features --benches --release --keep-going | ||
- run: cargo test --all-features --release | ||
|
||
careful: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo install cargo-careful | ||
- run: cargo careful test | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
- run: cargo clippy --all --all-features -- -D warnings | ||
|
||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
- run: cargo fmt -- --check | ||
|
||
doc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- run: cargo doc --all-features | ||
|
||
deps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo install cargo-udeps | ||
- run: cargo udeps --all-targets --all-features | ||
|
||
outdated: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo install cargo-outdated | ||
- run: cargo outdated --root-deps-only --exit-code 1 | ||
|
||
pants: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- run: cargo install cargo-pants | ||
- run: cargo pants --loud | ||
|
||
cross: | ||
needs: set-msrv | ||
strategy: | ||
matrix: | ||
include: | ||
- target: powerpc-unknown-linux-gnu | ||
rust: ${{needs.set-msrv.outputs.msrv}} | ||
- target: powerpc-unknown-linux-gnu | ||
rust: stable | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
targets: ${{ matrix.target }} | ||
- uses: RustCrypto/actions/cross-install@master | ||
- run: cross test --release --target ${{ matrix.target }} --all-features |
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 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = ["dhkem", "ml-kem", "x-wing"] | ||
members = ["dhkem", "frodo-kem", "ml-kem", "x-wing"] | ||
|
||
[profile.bench] | ||
debug = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# RustRover | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea/ | ||
|
||
.vscode/ | ||
|
||
# Added by cargo | ||
|
||
/target |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[package] | ||
authors = ["Michael Lodder <[email protected]>"] | ||
categories = ["cryptography"] | ||
description = "A pure rust implementation of FrodoKEM that also includes some experimental features for Zero-Knowledge Proof of Encrypted Correctness" | ||
documentation = "https://docs.rs/frodo-kem-rs" | ||
edition = "2021" | ||
homepage = "https://github.com/mikelodder7/frodoKem" | ||
keywords = ["quantum", "post", "zero", "knowledge", "encryption"] | ||
license = "Apache-2.0 OR MIT" | ||
name = "frodo-kem-rs" | ||
readme = "README.md" | ||
repository = "https://github.com/mikelodder7/frodoKem" | ||
version = "0.1.0" | ||
|
||
[features] | ||
default = ["frodo640aes", "frodo640shake", "frodo976aes", "frodo976shake", "frodo1344aes", "frodo1344shake", "serde"] | ||
hazmat = [] | ||
experimental = [] | ||
frodo640aes = ["aes"] | ||
frodo640shake = [] | ||
frodo976aes = ["aes"] | ||
frodo976shake = [] | ||
frodo1344aes = ["aes"] | ||
frodo1344shake = [] | ||
serde = ["hex", "dep:serde"] | ||
|
||
[dependencies] | ||
aes = { version = "0.8", optional = true } | ||
hex = { version = "0.4", optional = true } | ||
rand_core = { version = "0.6", features = ["std"] } | ||
serde = { version = "1.0", features = ["derive"], optional = true } | ||
subtle = "2.6" | ||
sha3 = { version = "0.10" } | ||
thiserror = "1.0" | ||
zeroize = "1" | ||
|
||
[dev-dependencies] | ||
bincode = "1.3" | ||
criterion = "0.5" | ||
rand_chacha = "0.3" | ||
rstest = "0.23" | ||
safe-oqs = { version = "0.10", default-features = false, features = ["frodokem"] } | ||
postcard = { version = "1.0", features = ["use-std"] } | ||
serde_bare = "0.5" | ||
serde_cbor = "0.11" | ||
serde_json = "1.0" | ||
serde_yaml = "0.9" | ||
toml = "0.8" | ||
|
||
[package.metadata.docs.rs] | ||
features = ["frodo640aes", "frodo640shake", "frodo976aes", "frodo976shake", "frodo1344aes", "frodo1344shake", "serde"] | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[[bench]] | ||
name = "safe-oqs" | ||
harness = false | ||
path = "bench/safe_oqs.rs" | ||
required-features = ["frodo640aes", "frodo640shake", "frodo976aes", "frodo976shake", "frodo1344aes", "frodo1344shake"] | ||
|
Oops, something went wrong.