Skip to content

Initial mlkem-rust-libcrux PQ code packages release #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
# (TODO customize .gitignore for project)

.vscode
.idea
.idea
/target
Cargo.lock
7 changes: 7 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Add code of conduct)

Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Add contributing guide)

Expand Down
108 changes: 108 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: MIT

[workspace.package]
version = "0.0.2-alpha.3"
authors = ["Cryspen"]
license = "Apache-2.0"
homepage = "https://github.com/pq-code-package/mlkem-rust-libcrux"
edition = "2021"
repository = "https://github.com/pq-code-package/mlkem-rust-libcrux"
readme = "Readme.md"

[package]
name = "libcrux-ml-kem"
version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
edition.workspace = true
repository.workspace = true
readme = "README.md"
description = "Libcrux ML-KEM & Kyber implementations"
exclude = [
"/tests",
"/implementation_notes.pdf",
"/c",
"/proofs",
"/c.sh",
"/c.yaml",
"/hax.py",
]

[lib]
bench = false # so libtest doesn't eat the arguments to criterion

[dependencies]
rand = { version = "0.8", optional = true }
libcrux-platform = { version = "0.0.2-beta.2" }
libcrux-sha3 = { version = "0.0.2-beta.2" }
libcrux-intrinsics = { version = "0.0.2-beta.2" }

# This is only required for verification.
# The hax config is set by the hax toolchain.
[target.'cfg(hax)'.dependencies]
hax-lib = { version = "0.1.0-alpha.1", git = "https://github.com/hacspec/hax/" }

[features]
# By default all variants and std are enabled.
default = ["std", "mlkem512", "mlkem768", "mlkem1024", "rand"]

# Hardware features can be force enabled.
# It is not recommended to use these. This crate performs CPU feature detection
# and enables the features when they are available.
simd128 = ["libcrux-sha3/simd128", "libcrux-intrinsics/simd128"]
simd256 = ["libcrux-sha3/simd256", "libcrux-intrinsics/simd256"]

# Features for the different key sizes of ML-KEM
mlkem512 = []
mlkem768 = []
mlkem1024 = []

# Enable Round 3 Kyber in addition to ML-KEM
kyber = []

# Code that is not yet verified
pre-verification = []

# APIs that sample their own randomness
rand = ["dep:rand"]

# std support
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"

[[bench]]
name = "ml-kem"
harness = false

[[example]]
name = "encapsulate"
required-features = ["mlkem768"]

[[example]]
name = "decapsulate"
required-features = ["mlkem768"]

[[example]]
name = "keygen"
required-features = ["mlkem768"]

[package.metadata."docs.rs"]
features = ["pre-verification", "kyber"]
rustdoc-args = ["--cfg", "doc_cfg"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(hax)',
'cfg(eurydice)',
'cfg(doc_cfg)',
] }
7 changes: 7 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Define governance)

Expand Down
7 changes: 7 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Update list of maintainers)

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Customize project readme)

Expand Down
7 changes: 7 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO Add Security Policy)

Expand Down
7 changes: 7 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)
[//]: # (TODO add support information)

Expand Down
7 changes: 7 additions & 0 deletions antitrust.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<!--
SPDX-FileCopyrightText: 2024 Cryspen Sarl <[email protected]>

SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: MIT
-->

[//]: # (SPDX-License-Identifier: CC-BY-4.0)

# Antitrust Policy Notice
Expand Down
Loading