Developers
Implementing
Guide for writing a compatible ForgeHash-B3 v1 implementation. See the developers hub for the full path. Matching test vectors is not production safety.
Experimental cryptography. Matching test vectors ≠ production-safe.
Goal
Produce bit-identical outputs for the official v1 vectors in implementers/v1/. If your digests match all four vectors (and parallel/sequential agree when you add lanes), your implementation is v1-compatible.
What you must implement
Follow SPECIFICATION.md exactly. Do not substitute SHA-256, Argon2, or unkeyed BLAKE3 where derive-key / XOF / keyed-hash is required.
Use the checklist in implementers/v1/CHECKLIST.md.
Minimum building blocks:
- Little-endian helpers (
LE32,LE64) - BLAKE3: derive-key (
ForgeHash/v1/seed), XOF expand, plain hash, keyed hash (pepper), XOF output FastRange= high 64 bits of 128-bitx * n- ForgeMix (8 rounds, row/column/diagonal, perm
73x+19 mod 128, feed-forward) - Memory fill with 4 slices/pass, pass-0 init blocks 0–1, later-pass XOR overwrite
- Reference selection + completed-slice cross-lane rules
- Finalization: lane samples + 64-block groups + group-root + root + output XOF
- Canonical encoding
$forgeh$v=1$m=...,t=...,p=...$salt$hash
Suggested port order
| Step | Deliverable | Validate with |
|---|---|---|
| A | BLAKE3 domain strings + seed | Vector seed hex |
| B | Expand + init blocks | Initialized block prefixes |
| C | ForgeMix only | Mix sample prefixes |
| D | Single-lane fill + finalize | Vectors 1 & 2 final hash |
| E | Multi-lane + slices | Vectors 3 & 4 |
| F | Encoder/parser | Encoded string exact match |
| G | Parallel lanes (optional) | Same digests as sequential |
Implementer pack
Machine-readable pack:
implementers/v1/manifest.json
implementers/v1/vectors/*.json
Each vector JSON includes password/salt hex, parameters, seed, group root, hash, encoded string, and sampled intermediates. Load manifest.json, then assert every listed field.
Common pitfalls
- Ordinary BLAKE3 hash instead of derive-key for the seed
- Forgetting domain prefixes (
ForgeHash/v1/...) - Big-endian word IO
- Accepting padded Base64 or reordered
m,t,p - Cross-lane reads from the current incomplete slice
- Finalizing from lane-last-blocks only (must include group digests)
- Unicode-normalizing passwords in the core
- Silently truncating long passwords
Parallelism
p is lane count, not “use p OS threads”. A multithreaded port must barrier after every slice and match the sequential digests exactly.
Compatibility claim
An implementation may claim ForgeHash-B3 v1 compatible only if:
- All official vectors pass bit-exactly
- Parser rejects the non-canonical examples in the specification
- Verification uses constant-time comparison
- Docs state the algorithm is experimental / not production-ready
ForgeHash-X sandbox
Separate track: custom ForgeX sponge, encoding $forgehx$v=0$. Use SPECIFICATION_X.md, checklist implementers/x0/CHECKLIST.md, and X Vectors. Do not mix B3 and X digests or parsers.