99db18af16
Ported from QA's proof tests for PR #2 (qa_s03 to qa_s05): - S-01, sig_halves: an Ed25519 half with a small-order R (the identity, s = H(R || A || M')·a from a throwaway key's own scalar) is accepted by plain verify and refused by verify_strict; Arcanum must refuse it. - S-02, sig_every_byte: a forged window that also excludes now gives InvalidSignature, never OutsideValidity. - S-03, sig_composite: generate draws exactly 64 bytes, and the two seeds are those bytes in order (RFC 10073 3.1, independent component keys). Each mutation QA describes now fails (applied to src/sign.rs, reverted): Q1 verify_strict -> verify fails the S-01 test; Q3 now checked before the signature fails the S-02 test; Q4 the Ed25519 seed copied from the ML-DSA seed fails the S-03 test. Adds curve25519-dalek =5.0.0 as a dev-dependency (already in the lock) for the scalar arithmetic.
55 lines
2.8 KiB
TOML
55 lines
2.8 KiB
TOML
[package]
|
|
name = "arcanum"
|
|
version = "0.2.0"
|
|
edition = "2024"
|
|
rust-version = "1.88"
|
|
license = "CPAL-1.0"
|
|
description = "Hybrid post-quantum key exchange (X-Wing: ML-KEM-768 + X25519), key schedule, WireGuard PSK derivation, sealing and hybrid signatures (ML-DSA-65 + Ed25519, RFC 10073) for the Domi ecosystem"
|
|
repository = "https://gitea.marek-novak.cz/mnovak/arcanum"
|
|
readme = "README.md"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
# Primitives: every one from a vetted crate, none written here (docs/01_arcanum.md).
|
|
ml-kem = { version = "=0.3.4", default-features = false, features = ["zeroize"] }
|
|
x25519-dalek = { version = "=3.0.0", default-features = false, features = ["static_secrets", "zeroize"] }
|
|
sha3 = { version = "0.12", default-features = false, features = ["zeroize"] }
|
|
shake = { version = "0.1", default-features = false, features = ["zeroize"] }
|
|
sha2 = { version = "0.11", default-features = false, features = ["zeroize"] }
|
|
hkdf = { version = "0.13", default-features = false }
|
|
hmac = { version = "0.13", default-features = false, features = ["zeroize"] }
|
|
chacha20poly1305 = { version = "0.11", default-features = false, features = ["alloc", "zeroize"] }
|
|
rand_core = { version = "0.10", default-features = false }
|
|
zeroize = { version = "1.8", default-features = false, features = ["alloc", "zeroize_derive"] }
|
|
# v0.2.0 signatures (docs/02_signatures.md): ML-DSA-65 (FIPS 204) and Ed25519 (RFC 8032), combined as
|
|
# RFC 10073 id-MLDSA65-Ed25519-SHA512. Pinned exactly; `zeroize` is opt-in in ml-dsa and must stay on.
|
|
ml-dsa = { version = "=0.1.2", default-features = false, features = ["alloc", "rand_core", "zeroize"] }
|
|
ed25519-dalek = { version = "=3.0.0", default-features = false, features = ["zeroize"] }
|
|
|
|
[features]
|
|
# Deterministic entry points (`_derand`, `from_seed`) and the bare RFC 10073 signature interface
|
|
# (`sign_composite_raw`, `verify_composite_raw`) for the known-answer tests. Off by default;
|
|
# never enable it in a release build (tests/feature_hygiene.rs checks the normal dependency graph).
|
|
hazmat = []
|
|
|
|
[dev-dependencies]
|
|
# The tests enable `hazmat` on the crate itself; dev-dependencies never reach a normal build.
|
|
arcanum = { path = ".", features = ["hazmat"] }
|
|
# Reference implementation for the differential test only; never linked into the library.
|
|
x-wing = { version = "=0.1.1" }
|
|
chacha20 = { version = "0.10", default-features = false, features = ["rng"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
hex = "0.4"
|
|
sha2 = "0.11"
|
|
# The RFC 10073 vectors are base64.
|
|
base64 = "0.22"
|
|
# Ed25519 scalar arithmetic, for the small-order-R half (QA S-01). Already in the lock via ed25519-dalek.
|
|
curve25519-dalek = { version = "=5.0.0", default-features = false }
|
|
|
|
# ML-KEM in a debug build is slow; the byte-flip tests run thousands of exchanges.
|
|
[profile.dev.package."*"]
|
|
opt-level = 2
|
|
[profile.test.package."*"]
|
|
opt-level = 2
|