4 Commits
Author SHA1 Message Date
Hanzo AI 158edb279c fix: gofmt -s across repo (CI format check) 2026-06-02 11:39:06 -07:00
Hanzo AI 6bed745f70 merge: blake3-vanilla-2026-04-27 2025-12-28 12:55:00 -08:00
Hanzo AI 5254c54628 blake3: vanilla Go canonical (closes hard violation #3)
Author lux/crypto/blake3/ to mirror lux/crypto/keccak and lux/crypto/sha256:

- blake3.go: Hash, HashHex, HashBatch, New, NewKeyed, KeyedHash,
  DeriveKey, Reader (XOF), Concat. Backed by github.com/zeebo/blake3
  (BSD-3, pure Go with SSE4.1/AVX2/NEON), counted as vanilla per
  CANONICAL_AUDIT.md directive.
- gpu.go: batchGPU stub matching keccak/sha256 dispatch surface; falls
  through to CPU because luxfi/accel does not yet expose a real BLAKE3
  kernel (its HashBlake3 currently aliases SHA-256). When accel ships
  the kernel, wire it in here, no API change.
- blake3_test.go: 35/35 official BLAKE3 reference KAT vectors
  (test_vectors.json embedded) for hash, keyed_hash, derive_key. Plus
  batch parity, incremental==contiguous, XOF, hex, key-size validation.
- doc.go: package overview matching keccak/sha256 docs.

Closes the blake3 hard violation in CANONICAL_AUDIT.md (commit 9affea3).
2025-12-28 05:29:26 -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