mirror of
https://github.com/luxfi/crypto.git
synced 2026-10-30 16:59:13 +00:00
One Rust crate per algorithm, plus an `lux-crypto` umbrella that re-exports
each per-algorithm crate behind a Cargo feature.
5 working crates with verified spec vectors:
- lux-crypto-keccak (Ethereum keccak256)
- lux-crypto-secp256k1 (ecrecover precompile + batch)
- lux-crypto-sha256 (FIPS 180-4)
- lux-crypto-ripemd160 (Bitcoin/Ethereum address derivation)
- lux-crypto-blake2b (RFC 7693)
15 wired-but-NOTIMPL crates (canonical Rust binding shipped, body returns
CRYPTO_ERR_NOTIMPL today; spec-vector tests gated `#[ignore]` with FIXME):
blake3, ed25519, slhdsa, mldsa, mlkem, bls, kzg, bn254, aead, ipa,
pedersen, lamport, ntt, poly-mul, evm256.
cargo check --release --workspace --all-features OK
cargo test --release --workspace 55 pass / 0 fail / 25 ignored
cargo doc --no-deps --workspace clean
cargo publish --dry-run --no-verify OK for all 20 leaf crates
Workspace docs added at rust/{README,PUBLISHING,RUST_CRATE_STATUS}.md.
Per-crate README.md and `Cargo.toml` metadata (description, license,
repository, keywords, categories, readme) wired for crates.io publish.
Build directives normalized: link both `lib<alg>.a` (C-ABI shim) and
`lib<alg>_cpu.a` (CPU body); brand-neutral C symbols (no lux_ prefix) per
the prefix-uniform audit.
83 lines
4.2 KiB
TOML
83 lines
4.2 KiB
TOML
[package]
|
|
name = "lux-crypto"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Umbrella crate for Lux crypto. Re-exports the per-algorithm crates that bind to luxcpp/crypto via the C-ABI."
|
|
repository = "https://github.com/luxfi/crypto"
|
|
readme = "README.md"
|
|
keywords = ["crypto", "ffi", "post-quantum", "ethereum", "umbrella"]
|
|
categories = ["cryptography"]
|
|
|
|
[lib]
|
|
name = "lux_crypto"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Per-algorithm dependencies. Each algorithm sits behind a Cargo feature so
|
|
# downstream consumers can pick exactly the surface they need. The default
|
|
# set covers the four algorithms whose underlying C-ABI body is wired and
|
|
# byte-equal to a published reference today: keccak256, secp256k1 ecrecover,
|
|
# SHA-256, RIPEMD-160. Add `blake2b` to that set for hash-only callers.
|
|
# ---------------------------------------------------------------------------
|
|
|
|
[dependencies]
|
|
lux-crypto-aead = { version = "0.1.0", path = "../lux-crypto-aead", optional = true }
|
|
lux-crypto-blake2b = { version = "0.1.0", path = "../lux-crypto-blake2b", optional = true }
|
|
lux-crypto-blake3 = { version = "0.1.0", path = "../lux-crypto-blake3", optional = true }
|
|
lux-crypto-bls = { version = "0.1.0", path = "../lux-crypto-bls", optional = true }
|
|
lux-crypto-bn254 = { version = "0.1.0", path = "../lux-crypto-bn254", optional = true }
|
|
lux-crypto-ed25519 = { version = "0.1.0", path = "../lux-crypto-ed25519", optional = true }
|
|
lux-crypto-evm256 = { version = "0.1.0", path = "../lux-crypto-evm256", optional = true }
|
|
lux-crypto-ipa = { version = "0.1.0", path = "../lux-crypto-ipa", optional = true }
|
|
lux-crypto-keccak = { version = "0.1.0", path = "../lux-crypto-keccak", optional = true }
|
|
lux-crypto-kzg = { version = "0.1.0", path = "../lux-crypto-kzg", optional = true }
|
|
lux-crypto-lamport = { version = "0.1.0", path = "../lux-crypto-lamport", optional = true }
|
|
lux-crypto-mldsa = { version = "0.1.0", path = "../lux-crypto-mldsa", optional = true }
|
|
lux-crypto-mlkem = { version = "0.1.0", path = "../lux-crypto-mlkem", optional = true }
|
|
lux-crypto-ntt = { version = "0.1.0", path = "../lux-crypto-ntt", optional = true }
|
|
lux-crypto-pedersen = { version = "0.1.0", path = "../lux-crypto-pedersen", optional = true }
|
|
lux-crypto-poly-mul = { version = "0.1.0", path = "../lux-crypto-poly-mul", optional = true }
|
|
lux-crypto-ripemd160 = { version = "0.1.0", path = "../lux-crypto-ripemd160", optional = true }
|
|
lux-crypto-secp256k1 = { version = "0.1.0", path = "../lux-crypto-secp256k1", optional = true }
|
|
lux-crypto-sha256 = { version = "0.1.0", path = "../lux-crypto-sha256", optional = true }
|
|
lux-crypto-slhdsa = { version = "0.1.0", path = "../lux-crypto-slhdsa", optional = true }
|
|
|
|
[features]
|
|
default = ["keccak", "secp256k1", "sha256", "ripemd160"]
|
|
|
|
aead = ["dep:lux-crypto-aead"]
|
|
blake2b = ["dep:lux-crypto-blake2b"]
|
|
blake3 = ["dep:lux-crypto-blake3"]
|
|
bls = ["dep:lux-crypto-bls"]
|
|
bn254 = ["dep:lux-crypto-bn254"]
|
|
ed25519 = ["dep:lux-crypto-ed25519"]
|
|
evm256 = ["dep:lux-crypto-evm256"]
|
|
ipa = ["dep:lux-crypto-ipa"]
|
|
keccak = ["dep:lux-crypto-keccak"]
|
|
kzg = ["dep:lux-crypto-kzg"]
|
|
lamport = ["dep:lux-crypto-lamport"]
|
|
mldsa = ["dep:lux-crypto-mldsa"]
|
|
mlkem = ["dep:lux-crypto-mlkem"]
|
|
ntt = ["dep:lux-crypto-ntt"]
|
|
pedersen = ["dep:lux-crypto-pedersen"]
|
|
poly-mul = ["dep:lux-crypto-poly-mul"]
|
|
ripemd160 = ["dep:lux-crypto-ripemd160"]
|
|
secp256k1 = ["dep:lux-crypto-secp256k1"]
|
|
sha256 = ["dep:lux-crypto-sha256"]
|
|
slhdsa = ["dep:lux-crypto-slhdsa"]
|
|
|
|
# Convenience set: every algorithm whose C-ABI body is wired today.
|
|
working = ["keccak", "secp256k1", "sha256", "ripemd160", "blake2b"]
|
|
|
|
# Convenience set: every per-algorithm crate in the workspace, including
|
|
# the ones whose C-ABI body is currently a CRYPTO_ERR_NOTIMPL stub.
|
|
all = [
|
|
"aead", "blake2b", "blake3", "bls", "bn254", "ed25519", "evm256",
|
|
"ipa", "keccak", "kzg", "lamport", "mldsa", "mlkem", "ntt", "pedersen",
|
|
"poly-mul", "ripemd160", "secp256k1", "sha256", "slhdsa",
|
|
]
|