mirror of
https://github.com/luxfi/crypto.git
synced 2026-10-30 16:59:13 +00:00
Establish a Rust workspace at rust/Cargo.toml that admits per-algorithm
canonical bindings to luxcpp/crypto only when the C-ABI returns real
cryptographic output verifiable against published spec vectors.
- rust/Cargo.toml: workspace root with shared edition/license/lints.
- rust/lux-crypto-keccak: canonical binding to lux_keccak256. 12 tests
asserting byte-equality vs keccak.team / Yellow Paper / eth_hash
Python (cross-checked) reference values across the empty input,
short strings, sponge-rate boundary (135 zero bytes), multi-block
absorption (2048 incrementing bytes), and the 1,000,000-'a' stress
vector.
- rust/lux-crypto-secp256k1: canonical binding to
lux_secp256k1_ecrecover{,_batch}. 6 tests asserting byte-equality
vs eth_keys Python reference values across 3 distinct keypairs and
the v-low-bit recid convention.
- rust/lux-crypto: umbrella retained for backward compatibility; new
COVERAGE.md documents 27/27 workspace tests passing and lists
per-algorithm crates intentionally deferred (sha256, ripemd160,
blake2b, blake3, ed25519, sr25519, secp256r1, mldsa, mlkem, slhdsa,
bls, bn254, modexp, evm256, aead, poseidon, pedersen, ipa, verkle,
kzg, lamport, ntt, poly_mul, frost, cggmp21, corona) until the
underlying C-ABI bodies stop returning CRYPTO_ERR_NOTIMPL.
Build: CRYPTO_BUILD_DIR=/path/to/luxcpp/crypto/build-canonical
cargo test --workspace --release
Result: 27 passed, 0 failed, 0 ignored.