Skip to content

luxcpp/crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

187 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luxcpp/crypto

Canonical native cryptographic primitives for the Lux / Hanzo / Zoo ecosystem. CPU + GPU implementations live here and only here.

  • CPU: portable C++17 / C++20, no third-party crypto libraries
  • GPU: CUDA, Metal, WGSL kernels with byte-equal CPU↔GPU output
  • C ABI: include/lux/crypto/<alg>.h, callable from Go (cgo) and Rust (bindgen / lux-crypto-sys)

The Go entry point is github.com/luxfi/crypto; the GPU device router is github.com/luxfi/accel.

Status

Phase 1 (current): secp256k1, keccak. See MIGRATION.md for the full per-algorithm migration plan and status.

Building

mkdir -p build && cd build
cmake -DCRYPTO_ENABLE_METAL=ON ..
cmake --build . -j$(nproc)
ctest --output-on-failure

Tests

keccak_test           : 3/3 canonical Ethereum vectors
secp256k1_test        : RFC 6979 §A.2.5 + 64 round-trip + edge + batch
secp256k1_gpu_test    : CPU vs Metal byte-equal across 32 signatures

Hard rules

  1. No vendoring. First-party only. See MIGRATION.md for forbidden includes.
  2. No stubs. A new algorithm enters this tree only when its tests prove byte-equality against canonical reference vectors.
  3. One source of truth. Other ecosystem repos import this; nothing else implements crypto.

License

BSD-3-Clause-Eco. See LICENSE.

About

Lux C++ cryptography library - BLS12-381 pairings, ML-DSA, ML-KEM post-quantum signatures

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors