-
Notifications
You must be signed in to change notification settings - Fork 16
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
52af832
commit 994d816
Showing
4 changed files
with
92 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# (TODO customize .gitignore for project) | ||
|
||
.vscode | ||
.idea | ||
/target | ||
Cargo.lock |
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,45 @@ | ||
[package] | ||
name = "libcrux-ml-kem" | ||
version = "0.0.2-pre.2" | ||
authors = ["Cryspen"] | ||
license = "Apache-2.0" | ||
homepage = "https://github.com/cryspen/libcrux" | ||
edition = "2021" | ||
repository = "https://github.com/cryspen/libcrux" | ||
readme = "Readme.md" | ||
exclude = ["/tests", "/implementation_notes.pdf"] | ||
|
||
[dependencies] | ||
rand_core = { version = "0.6" } | ||
libcrux-platform = { git = "https://github.com/cryspen/libcrux", version = "0.0.2-pre.2", branch = "dev" } | ||
libcrux-sha3 = { git = "https://github.com/cryspen/libcrux", version = "0.0.2-pre.2", branch = "dev" } | ||
libcrux-intrinsics = { git = "https://github.com/cryspen/libcrux", version = "0.0.2-pre.2", branch = "dev" } | ||
|
||
# This is only required for verification. | ||
# The hax config is set by the hax toolchain. | ||
[target.'cfg(hax)'.dependencies] | ||
hax-lib = { git = "https://github.com/hacspec/hax/" } | ||
|
||
[features] | ||
default = ["std"] | ||
simd128 = ["libcrux-sha3/simd128"] | ||
simd256 = ["libcrux-sha3/simd256"] | ||
tests = [] # Test utilities. DO NOT USE. | ||
std = [] | ||
|
||
[dev-dependencies] | ||
rand = { version = "0.8" } | ||
serde_json = { version = "1.0" } | ||
serde = { version = "1.0", features = ["derive"] } | ||
hex = { version = "0.4.3", features = ["serde"] } | ||
criterion = "0.5" | ||
libcrux-ml-kem = { path = ".", features = ["tests"] } | ||
|
||
[[bench]] | ||
name = "ml-kem" | ||
harness = false | ||
|
||
[profile.release] | ||
lto = "fat" | ||
codegen-units = 1 | ||
panic = "abort" |
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,7 @@ | ||
build.rs | ||
examples | ||
src | ||
tests | ||
benches | ||
pqcp/Cargo.toml | ||
pqcp/.gitignore |
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,33 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script copies files to be included in the `mlkem-rust-libcrux` | ||
# crate for the PQ code package. Files and directories to be copied | ||
# are listed, one per line, in a file at `ALLOWLIST` and copied to | ||
# `TARGET_DIR`, which should be the `mlkem-rust-libcrux` git | ||
# repository. The copied files include custom Cargo.toml and | ||
# .gitignore files for mlkem-rust-libcrux. On successful completion of | ||
# `cargo test`, a signed-off commit is created in the target | ||
# repository. | ||
|
||
|
||
|
||
set -e | ||
set -o pipefail | ||
|
||
ALLOWLIST="pqcp/allowlist.txt" | ||
|
||
if [[ -z "$TARGET_DIRECTORY" ]]; then | ||
echo "Please set TARGET_DIRECTORY to the libcrux-ml-kem PQ code packages repository" | ||
exit 1 | ||
fi | ||
|
||
while read -r item; do | ||
cp -r "$item" "$TARGET_DIRECTORY" | ||
done < "$ALLOWLIST" | ||
|
||
cd "$TARGET_DIRECTORY" | ||
cargo test | ||
cargo clean | ||
|
||
git add . | ||
git commit -sm "mlkem-rust-libcrux PQ code packages update ($(date))" |