318 Commits
Author SHA1 Message Date
Hanzo AI fe5fdbbca5 crypto/rust: add lux-crypto-ntt + lux-crypto-poly_mul bindings
Two new no_std crates wrapping the C-ABI from luxcpp/crypto/ntt and
luxcpp/crypto/poly_mul.

lux-crypto-ntt:
  * forward / inverse — generic-prime NTT (caller-supplied modulus + root)
  * Cyclone-FFT fast path engaged automatically when (modulus, root) ==
    (Q=998244353, PRIMITIVE_ROOT=629671588)
  * 6 spec-vector tests:
      - forward+inverse roundtrip across n in {2,4,...,1024}
      - q97/omega=28 generic-prime roundtrip (matches Go reference)
      - input rejection: empty, non-pow2, modulus=0

lux-crypto-poly_mul:
  * multiply / multiply_into — Z_Q[X]/(X^n+1) negacyclic convolution
  * Pinned to Cyclone-FFT prime (the C-ABI rejects other rings)
  * 4 spec-vector tests including the canonical 10-case KAT table
    (sum/first/last byte-equal to luxfi/crypto/poly_mul Go reference)
    and the (1+2X+3X^2+4X^3)*(5+6X+7X^2+8X^3) hand-written negacyclic case.

build.rs links statically against libntt_cpu.a / libpoly_mul_cpu.a
produced by luxcpp/crypto/ntt and luxcpp/crypto/poly_mul; CRYPTO_BUILD_DIR
or CRYPTO_DIR points at the cmake build / install layout.

Verified: cargo test -p lux-crypto-ntt -p lux-crypto-poly_mul
  6/6 ntt tests PASS, 4/4 poly_mul tests PASS.
2025-12-28 02:53:12 -08:00
Hanzo AI e209c399ed rust: ship lux-crypto-poseidon over Poseidon2 t=2 BN254 C-ABI
Canonical Rust binding for the Poseidon2 t=2 BN254 Merkle-Damgard
hasher landed in luxcpp/crypto/poseidon. Links statically against
libposeidon.a + libposeidon_cpu.a and exposes:

  hash(input)               -> [u8; 32]
  hash_into(input, output)  -> in-place fill of caller buffer

Byte-equal to upstream gnark-crypto v0.20.1 (NewMerkleDamgardHasher
over NewParameters(2, 6, 50)). 10 spec-vector integration tests
pass, including the canonical 32B/64B/96B block-boundary cases and
trivial avalanche/determinism checks.

Crate is no_std + forbid(unsafe_op_in_unsafe_fn) and follows the
existing per-algorithm crate layout.
2025-12-28 02:27:10 -08:00
Hanzo AI d97fe02730 rust: ship lux-crypto-blake3 with 140-vector spec_vectors KAT
Real Rust binding over the now-real luxcpp/crypto/blake3 C-ABI
(commit c4a1d2e0, "vendor BLAKE3 v1.5.0 reference C"). Exposes all four
canonical BLAKE3 modes:

    hash(input)                          -> [u8; 32]
    keyed_hash(key, input)               -> [u8; 32]
    derive_key(context_z, key_material)  -> [u8; 32]
    hash_xof(input, &mut output)         -> ()

Statically links libblake3.a + libblake3_cpu.a from the build dir
(CRYPTO_BUILD_DIR or the canonical build-cto/ default).

Test (tests/spec_vectors.rs) parses upstream test_vectors.json (vendored
under luxcpp/crypto/blake3/test/vectors/) and asserts byte-equality
across all 35 cases x 4 modes = 140 assertions. cargo test PASS.
2025-12-28 02:01:07 -08:00
Hanzo AI 686b38b19b crypto/rust: default lux-crypto umbrella to build-cto, not stale build-canonical
The lux-crypto umbrella crate's build.rs defaulted to ../../../../luxcpp/crypto/
build-canonical when neither CRYPTO_DIR nor CRYPTO_BUILD_DIR was set. That
directory is a partial build from before the 2026-04-26 brand-neutral C-ABI
rename (luxcpp commit e8690bb8 "drop lux_ prefix from C-ABI symbols"). Its
libsecp256k1_cpu.a still exports _lux_secp256k1_ecrecover (legacy) while the
Rust extern "C" block expects _secp256k1_ecrecover (post-rename, brand-neutral).
build-canonical also lacks banderwagon/sha256/ripemd160 archives.

All 17 sibling per-algorithm crates already default to build-cto; only the
umbrella was misaligned. Switching the umbrella default to build-cto makes the
workspace build out of the box.

Verified: cargo test --workspace --all-features reports 182 PASS, 0 fail
(matching the #97-retry baseline) with no env vars set, and also with explicit
CRYPTO_BUILD_DIR=/Users/z/work/luxcpp/crypto/build-cto.
2025-12-28 01:35:05 -08:00
Hanzo AI dc7b4099e2 rust: ship 14 per-algorithm crates over real luxcpp/crypto C-ABI
Adds lux-crypto-{sha256, ripemd160, blake2b, aead, lamport, mldsa,
mlkem, slhdsa, banderwagon, pedersen, ipa, verkle, evm256, kzg} on
top of the existing keccak + secp256k1 + umbrella, gated on
verified-real C-ABI dispatch (nm shows the extern "C" symbols and
spec-vector integration tests assert byte-equality vs published
reference values).

Workspace test sweep (CRYPTO_BUILD_DIR=.../build-cto):
  182 passed, 0 failed, 4 ignored (slow SLH-DSA 192f/256f).

Per crate:
  * sha256       - 12 tests (FIPS 180-4 / RFC 6234)
  * ripemd160    - 14 tests (Dobbertin et al. 1996)
  * blake2b      - 13 tests (RFC 7693 App. A)
  * aead         - 11 tests (RFC 8439 §2.8.2)
  * lamport      - 5 tests / 10 KAT vectors (luxfi/crypto KAT corpus)
  * mldsa        - 13 tests (FIPS 204 modes 2/3/5)
  * mlkem        - 12 tests (FIPS 203 modes 2/3/5, implicit rejection)
  * slhdsa       - 9 + 4 ignored (FIPS 205 sha2/shake 128f)
  * banderwagon  - 14 tests (16 published 2^i*G doublings KAT)
  * pedersen     - 12 tests (Banderwagon SRS)
  * ipa          - 12 tests (576-byte multiproof)
  * verkle       - 12 tests (256-element SRS)
  * evm256       - 4 tests / 12 KAT vectors (BLS Fr, secp256k1 N, etc)
  * kzg          - 12 tests (verify_proof real; blob ops surfaced as
                  Internal(-5) since c_kzg_blob.cpp is in a separate
                  TU not yet linked into libkzg.a)

Refused to ship:
  * blake3, poseidon, ed25519, bls — c-abi entry points still return
    CRYPTO_ERR_NOTIMPL in luxcpp/crypto/<alg>/c-abi/c_<alg>.cpp.
  * poly_mul — c-abi file is empty, no extern "C" exports.

Build: CRYPTO_BUILD_DIR=/path/to/luxcpp/crypto/build-cto cargo test --workspace

Each crate's build.rs links lib<alg>.a (c-abi shim) + lib<alg>_cpu.a
(implementation body); shared dependencies (sha256 for kzg+lamport,
banderwagon for pedersen+ipa+verkle, ipa SRS for pedersen, blst for
kzg, banderwagon_metal stub on macOS) are explicitly linked.

COVERAGE.md updated: 17 member crates, 182/182 tests passing,
deferred algorithms documented with their current c-abi status.
2025-12-28 01:09:03 -08:00
Hanzo AI 35ee76360e go.mod: replace go-ipa and go-verkle with luxfi mirrors
Route github.com/crate-crypto/go-ipa and github.com/ethereum/go-verkle
through luxfi-maintained mirrors so all Lux crypto consumers converge on a
single canonical source. Pinned to luxfi/go-verkle v0.2.2 and
luxfi/go-ipa@d31adc04. See LUXFI-FORK.md in each fork for sync policy.

Tests verified: ./verkle/... and ./ipa/... pass.
2025-12-28 00:43:01 -08:00
Hanzo AI c69cd6eecf slhdsa+lamport: NIST/spec KAT vectors at the Go layer
slhdsa: 120 NIST FIPS 205 ACVP keygen vectors (revision FIPS205, vsId 53;
        10 per parameter set x 12 sets), vendored from circl testdata
        (public-domain NIST sample data). Each vector pins
        (skSeed, skPrf, pkSeed) -> pk and is asserted byte-equal via the
        circl backend our Go layer wraps. Round-trip check signs and
        verifies once per parameter set.

lamport: 10 deterministic Lamport-SHA256 vectors derived from a documented
         KDF chain (SHA-256 of "lamport-kat/v1\\0" || seed). Each vector
         pins (seed, msg32) -> (PK digest, sig digest). The KDF contract is
         the cross-layer determinism contract - the C++ body and Metal
         driver must reproduce the same byte stream.

Test counts: slhdsa 24 (incl 120 KAT subtests), lamport 6 (incl 10 KAT).
Both packages PASS with GOWORK=off go test.
2025-12-28 00:16:58 -08:00
Hanzo AI f947715a1d aead: RFC 8439 ChaCha20-Poly1305 Go layer test — 9 tests / 11 subtests PASS (sibling #100) 2025-12-27 23:50:56 -08:00
Hanzo AI 8c8cca5356 blake3/poseidon: Layer 1 (Go) with KAT against published spec
blake3: pure-Go body wrapping zeebo/blake3 (already in go.mod). Three modes
(hash/keyed/derive_key) plus XOF. KAT against the official BLAKE3
test_vectors.json (35 input lengths from 0 to 102400 bytes, 4 modes each
= 140 byte-equal assertions).

poseidon: extended Sum2 wrapper with Permutation2 (raw t=2 permutation) and
Compress2 (gnark-crypto Compress contract). KAT vectors generated from
gnark-crypto v0.20.1 (default params t=2, rF=6, rP=50, d=5) for 16
permutation cases.

Both layers assert byte-equal to the published spec, no oracle indirection.
2025-12-27 23:24:54 -08:00
Hanzo AI acd5632204 poly_mul/pedersen/ipa/verkle: Layer 1 (Go) + KAT vectors
poly_mul: new package implementing polynomial multiplication over the
canonical FFT prime Q = 998244353 = 119 * 2^23 + 1. Schoolbook + NTT-based
negacyclic convolution paths; both byte-equal across the 10 KAT vectors
embedded in the test file. Reference for the C++ port and Metal kernel.

pedersen: extend with DeterministicGenerators(seed) and CommitBatch.
DeterministicGenerators yields a reproducible (G, H) pair from a seed so
the C++ and GPU layers share the same KAT inputs. CommitBatch is the
shape the GPU driver consumes. 11 KAT vectors locked in.

ipa: add CheckMultiProofBatch wrapping the existing single-proof verifier.
10 KAT batched proofs, plus tamper-detect and length-mismatch tests.

verkle: add Verify re-export and VerifyBatch wrapper. 10 single-leaf
KAT proofs verified end-to-end through the upstream go-verkle Verify.
2025-12-27 22:58:52 -08:00
Hanzo AI bebcd1cb1a ed25519/mldsa/mlkem: BENCHMARKS.md for v0.65 Metal kernels
ed25519: documents RFC 8032 byte-equal Metal verify kernel (100 vectors)
+ N_threshold = 256 on M1 Max with 26.7x speedup at N=4096 vs equivalent-
shape CPU port. dGPU CUDA port pending in lux/crypto/ed25519/gpu/cuda/.

mldsa: documents structural-skeleton M1 kernel + dGPU residual. Per-thread
serial work on Apple Silicon (~122 us SHAKE256-dominated) vs ~42 us NEON
narrows expected M1 wall-clock speedup to ~7x at N=4096; CUDA H100/Ada
closes that gap (~33x ceiling).

mlkem: same shape as mldsa, ~75 us per-thread Metal vs ~26 us NEON.
SHA3/SHAKE256 chains are the M1 ceiling; dGPU port closes it.
2025-12-27 22:32:49 -08:00
Hanzo AI 24b2670784 rust: add per-algorithm workspace + lux-crypto-{keccak,secp256k1}
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.
2025-12-27 22:06:47 -08:00
Hanzo AI 19336ebd9c rust/lux-crypto: add COVERAGE.md + BENCHMARKS.md, cover discriminator arms
- 3 new pure-Rust unit tests covering all Secp256k1Status::from_int
  arms (0..=7 + invalid), all CryptoStatus::from_int arms (Ok variants
  + 5 typed error variants + Unknown), and all NIST mode dispatch
  for mldsa/mlkem/slhdsa (Mode2, Mode3, Mode5).
- 9/9 tests passing via `cargo test --lib`.
- COVERAGE.md: pure-Rust dispatch helpers at 100% line; whole-crate
  36.97% reflects FFI declaration weight (extern "C" blocks +
  thin pub fn wrappers that forward to luxcpp/crypto C-ABI). The
  cryptographic logic itself is tested in luxcpp/crypto/<alg>/test/.
- BENCHMARKS.md: explicit no-criterion-yet note; Rust crate adds
  no measurable overhead to the FFI call so a Rust-side bench would
  duplicate the C-side numbers within sampling noise.
- .gitignore: target/, *.profraw, *.profdata.
2025-12-27 21:40:45 -08:00
Hanzo AI 74d1f329d1 rust: extend lux-crypto Rust surface with mldsa/mlkem/slhdsa/ed25519/keccak256
Adds Rust modules wrapping the canonical luxcpp/crypto C-ABI for:
  - ML-DSA (FIPS 204) modes 2/3/5
  - ML-KEM (FIPS 203) modes 2/3/5
  - SLH-DSA (FIPS 205) modes 2/3/5
  - Ed25519 keygen/sign/verify
  - keccak256 single-shot

Each module exposes safe Rust wrappers with size validation and a typed
CryptoStatus enum from the unified lux_crypto.h return-code contract.

Brand-neutral surface (no LUX_ prefix on Rust constants); link_name
attributes map to the existing lux_<alg>_<op> archive symbols until the
next luxcpp rebuild flips the archives to brand-neutral.

build.rs links per-algorithm libcpp_cpu.a archives from the
build-canonical/<alg>/ subdirectories.
2025-12-27 21:14:43 -08:00
Hanzo AI 15a447b682 rust: rename lux-crypto-sys → lux-crypto
The -sys suffix is a Rust ecosystem convention for thin FFI bindings to
THIRD-PARTY C libraries (openssl-sys, libgit2-sys, etc.). We author the
C/C++ ourselves at luxcpp/crypto, so -sys would be misleading.

Brand-neutral rule: 'one and one way to do everything' — the crate is
lux-crypto, the lib name is lux_crypto. If a high-level safe wrapper is
ever needed, it lives inside this same crate as pub mod safe.

Mirrors the canonical pattern at github.com/luxfi/gpu (Rust binding to
luxfi/accel) — no -sys suffix on first-party crates.

Consumers update separately.
2025-12-27 20:48:40 -08:00
Hanzo AI 935f55db81 brand-neutral: drop LUX_ prefix from env/symbols/exports
Brand stays in import path only; symbols, env vars, and exports are
brand-neutral. One-release backwards-compat shim reads deprecated
LUX_ names with deprecation log.

Env: CRYPTO_BACKEND, CRYPTO_DIR, CRYPTO_BUILD_DIR, CRYPTO_LIB_DIR,
CRYPTO_LIB are canonical.

Rust: idiomatic Secp256k1Status enum; extern fn names dropped lux_ prefix.

TS/Python: cryptoAvailable / crypto_available; FFI symbol strings drop
lux_ prefix to match renamed C-ABI in luxcpp/crypto.

cabi/main.go: //export names drop lux_ prefix (mlkem768_*, mldsa65_*).
2025-12-27 20:22:38 -08:00
Hanzo AI 86c5b88ba6 rust: scaffold lux-crypto-sys FFI crate
Phase-1 surface for Rust callers (Hanzo node, Lux node, Zoo node):
  * secp256k1: lux_secp256k1_ecrecover + lux_secp256k1_ecrecover_batch

Build script locates luxcpp/crypto via LUX_CRYPTO_DIR / LUX_CRYPTO_BUILD_DIR
or defaults to a sibling-checkout layout. Links against libsecp256k1_cpu.a
and the platform C++ runtime.

Subsequent agents extend this with mldsa/mlkem/slhdsa/bls12381/etc.
2025-12-27 19:56:36 -08:00
Hanzo AI ecaca10cdb canonical Go entry: backend selector + batch GPU paths via lux/accel
luxfi/crypto becomes the single Go entry point for ALL Lux-family crypto.
Every public function in this module now dispatches between three
implementations through a runtime-selectable backend:

  - vanilla: pure-Go reference (always available)
  - cgo:     native binding (blst, libsecp256k1, ckzg) where present
  - gpu:     batch acceleration via github.com/luxfi/accel

The dispatcher reads LUX_CRYPTO_BACKEND (auto|vanilla|cgo|gpu); auto
picks the most capable backend the binary was compiled and linked with.

New canonical packages:
  backend/             runtime backend selector (env + programmatic)
  internal/gpuhost/    accel session lifecycle, single per-process
  keccak/              Keccak-256 with batch GPU dispatch
  sha256/              SHA-256 with batch GPU dispatch
  sha3/                SHA3 / SHAKE family
  ripemd160/           RIPEMD-160 (Bitcoin/Lux address derivation)
  ed25519/             Ed25519 with batch GPU verify
  bn254/               canonical alias for bn256 (matches FIPS naming)
  modexp/              canonical alias for bigmodexp
  evm256/              EIP-196/197 precompile ABI wrappers
  poseidon/            Poseidon2 hash via gnark-crypto
  pedersen/            Pedersen commitments over BN254
  ntt/                 Number-Theoretic Transform reference
  polymul/             negacyclic polynomial multiplication

Extended existing packages with batch GPU paths:
  bls/batch.go         BatchVerify routes through accel.BLSVerifyBatch
  mldsa/batch.go       BatchVerify (ML-DSA-65) via accel.DilithiumVerifyBatch
  mlkem/batch.go       BatchEncapsulate / BatchDecapsulate via Kyber kernels
  secp256k1/batch.go   BatchVerifySignature via accel.ECDSAVerifyBatch

GPU dispatch is gated on (a) backend.Default(), (b) batch size threshold,
and (c) accel.Available(). When any gate fails the call falls through to
the vanilla CPU path; output is byte-identical.

The legacy gpu/ stub is replaced with a thin probe surface (Available,
Backend, Devices, Version) that delegates to the same gpuhost session.

Tests show vanilla and gpu backends produce identical outputs across all
batch entry points (-race clean).

See AUDIT.md for the per-algorithm state matrix and honest gaps.
2025-12-27 19:30:33 -08:00
Hanzo AI cef16f6f26 chore: untrack node_modules, improve .gitignore 2025-12-27 19:04:31 -08:00
Hanzo AI 2dabd480fa feat: add SignCtx/VerifySignatureCtx for domain-separated ML-DSA + SLH-DSA signing
Required by luxfi/utxo mldsafx/slhdsafx packages which use context-bound
signatures to separate signing domains (transaction vs vote vs attestation).
2025-12-27 18:38:29 -08:00
Hanzo AI ba4f2a2995 fix: kem cleanup 2025-12-27 18:12:27 -08:00
Hanzo AI f937139f29 fix: use luxfi/age instead of filippo.io/age
All encryption imports now use github.com/luxfi/age v1.4.0, the Lux
fork with native ML-KEM-768 + X25519 hybrid support.
2025-12-27 17:46:24 -08:00
Hanzo AI 5888981b58 feat: X-Wing (X25519 + ML-KEM-768) age recipient for post-quantum encryption 2025-12-27 17:20:22 -08:00
Hanzo AI ad7a2202fb security: remove signing/keygen precompiles, add BLS PoP, cap aggregate sigs
Private key material must never appear in EVM calldata — it is visible
to all nodes and permanently stored on-chain.

- Remove ML-DSA Sign + KeyGen precompiles (0x0113-0x0118)
- Remove ML-KEM Decapsulate + KeyGen precompiles (0x0123-0x0128)
- Remove SLH-DSA Sign precompiles (0x0136-0x0138)
- Add BLSVerifyPoP precompile (0x0167) to prevent rogue key attacks
- Cap BLSFastAggregate and BLSAggregateVerify to 64 keys/sigs max
- Precompile set is now verify-only + encapsulate-only
2025-12-27 16:54:20 -08:00
Hanzo AI 50d06e10ae fix: replace ML-KEM random stub with crypto/mlkem, complete precompile registration
The pure-Go ML-KEM fallback was filling keys/ciphertexts/secrets with
rand.Read, silently producing incorrect results without CGO+liboqs.
Replaced with Go 1.24+ crypto/mlkem (FIPS 203) for both 768 and 1024
parameter sets.

Completed ML-DSA (0x0110-0x0118), ML-KEM (0x0120-0x0128), and SLH-DSA
(0x0130-0x0138) precompile registration that was left as a comment.
2025-12-27 16:28:18 -08:00
Hanzo AI 6c6e8fc648 fix: gofmt verkle.go 2025-12-27 09:57:44 -08:00
Hanzo AI 4241372937 docs: README — architecture, primitives, usage 2025-12-27 16:02:15 -08:00
Hanzo AI 97dda512e4 ci: also exclude fuzzers/ from release build (test-only files) 2025-12-27 10:23:46 -08:00
Hanzo AI 3ca22ed9c3 ci: exclude cgo/ from release build verify (needs native libs) 2025-12-27 07:47:32 -08:00
Hanzo AI 2bd2ed12da ci: increase test timeout to 600s for slow crypto+race 2025-12-27 09:05:39 -08:00
Hanzo AI 16097ecabc ci: add timeout, fix slow test suite in release 2025-12-27 07:21:30 -08:00
Hanzo AI a4f6de6cd5 fix: gofmt fuzz and KAT test files 2025-12-27 09:31:41 -08:00
Hanzo AI b1adedfd08 ci: fix release workflow (v2 actions, library not binary) 2025-12-27 11:41:53 -08:00
Hanzo AI 174b7ecf6d ci: skip cgo/ tests when native C libs not installed 2025-12-27 08:13:35 -08:00
Hanzo AI 9af8a66139 chore: remove all TODOs from production code 2025-12-27 08:39:37 -08:00
Hanzo AI f1db74c283 ci: update actions to Node 24, fix golangci-lint v2 config
Update checkout@v5, setup-go@v6, cache@v5, codecov@v5. Pin
golangci-lint to v2.1.6 with version: "2" config. Fix release
workflow Go version to 1.26.1.
2025-12-27 12:07:55 -08:00
Hanzo AI 62eb57062b crypto: add fuzz and KAT tests for BLS, ML-DSA, ML-KEM 2025-12-27 10:49:48 -08:00
Hanzo AI 83eea3a764 crypto: remove dangerous stubs, fix BLS DKG
- Delete mpc/mpc.go (fake curve arithmetic x=k*2, y=k*3)
- cggmp21 Finalize() returns error instead of simulated values
- BLS DKG NewDKG() returns error directing to threshold/protocols/frost
2025-12-27 11:15:50 -08:00
Hanzo Dev 5b517231ba fix: ToPrivateKey now copies input bytes
ToPrivateKey stored a reference to the input slice, not a copy.
If the caller zeroed the original bytes after creating the key,
the PrivateKey's internal bytes were also zeroed, causing Sign()
to fail with "invalid private key". Now copies input bytes.
2025-12-27 15:36:13 -08:00
Hanzo Dev 67c60a794f chore: sync local changes 2025-12-27 15:10:11 -08:00
Hanzo Dev 040dce5b0a feat: add verkle and bigmodexp re-export wrappers
Re-export github.com/ethereum/go-verkle and
github.com/ethereum/go-bigmodexpfix under luxfi/crypto namespace
so downstream packages (luxfi/geth) never import ethereum/* directly.
2025-12-27 14:44:09 -08:00
Hanzo Dev db8eb1762f fix: gofmt formatting (bls_c.go, cabi, secp256k1 test) 2025-12-27 14:18:06 -08:00
Hanzo Dev 1d87d9a9a4 docs: update LLM.md with Go 1.26 features (secret/, HPKE) 2025-12-27 13:52:04 -08:00
Hanzo Dev b01d9e9e7b feat: Go 1.26.1 crypto features + runtime/secret support
- Add secret/ package: wraps runtime/secret.Do() for secure key erasure
  when built with GOEXPERIMENT=runtimesecret, no-op stub otherwise
- Add encryption/hpke.go: HPKE encryption using Go 1.26 stdlib crypto/hpke
  with X25519 (classical) and ML-KEM-768+X25519 (post-quantum hybrid)
- Wrap BLS key generation (both CGO and pure Go) in secret.Do()
- Wrap HexToECDSA and LoadECDSA in secret.Do() for key byte cleanup
- Simplify random.go: crypto/rand.Read never errors in Go 1.26
- Update CI workflows to Go 1.26.1, add GOEXPERIMENT=runtimesecret job
- Update dependencies: circl 1.6.3, x/crypto 0.48.0, age 1.3.1
2025-12-27 13:26:02 -08:00
Hanzo Dev fbe2b4578e chore: bump Go 1.26.0 → 1.26.1
Fixes 5 stdlib CVEs (html/template, os, net/url, crypto/x509 x2).
2025-12-27 13:00:00 -08:00
Hanzo Dev eed5bc77f1 chore: update Go module dependencies 2025-12-27 12:33:57 -08:00
Hanzo Dev 97ab7bd21b fix: update luxfi/log to v1.4.1 (module path fix)
luxfi/log v1.3.0 declared its module path as luxfi/logger,
causing build failures in downstream consumers.
2025-12-27 06:55:28 -08:00
Zach Kelling 9c13d22c2c fix: disable CGO in cross-platform build and make nancy non-blocking
Metal GPU headers (poseidon2) are not available in CI. Nancy gets
401 from OSS Index intermittently. Windows go.sum may differ.
2025-12-27 06:29:26 -08:00
Zach Kelling 6b9d89bd22 fix: update luxfi/log to v1.3.1 and exclude ASM dirs from gosec
- luxfi/log v1.3.0 declared module as luxfi/logger, v1.3.1 fixes this
- Exclude bn256 and ipa/bandersnatch from gosec (ASM stubs cause panic)
2025-12-27 06:03:23 -08:00
Zach Kelling b8779dcb89 feat: add GPU stub packages for crypto operations
Add stub packages for GPU-accelerated cryptography that return
false for Available() to indicate GPU is not available:
- gpu/gpu.go: General GPU crypto operations stub
- pq/mlkem/gpu/gpu.go: ML-KEM GPU operations stub

These stubs allow the precompile package to compile without
requiring actual GPU hardware.
2025-12-27 05:37:21 -08:00