|
4 | 4 | [](https://ziglang.org/) |
5 | 5 | [](LICENSE) |
6 | 6 |
|
7 | | -Pure Zig implementation of **Generalized XMSS** signatures with wire-compatible behavior against the Rust reference implementation ([leanSig](https://github.com/leanEthereum/leanSig)). Keys, signatures, and Merkle paths interchange freely between the two ecosystems for lifetimes `2^8`, `2^18`, and `2^32`. |
| 7 | +Pure Zig implementation of **Generalized XMSS** signatures with wire-compatible behavior against the Rust reference implementation ([leanSig](https://github.com/leanEthereum/leanSig)). Keys, signatures, and Merkle paths interchange freely between the two ecosystems for lifetimes `2^8`, `2^18`, and `2^32` for both **bincode** and **SSZ** encodings. |
8 | 8 |
|
9 | | -**✅ Cross-Language Compatibility**: All cross-language compatibility tests pass for lifetimes `2^8` and `2^32` in both directions (Rust↔Zig). For lifetime `2^18`, all flows pass except **Zig sign → Rust verify**, which currently fails only on the Rust side; this is being tracked as a known limitation of the 2^18 instantiation. |
| 9 | +**✅ Cross-Language Compatibility**: All cross-language compatibility tests now pass for lifetimes `2^8`, `2^18`, and `2^32` in both directions (Rust↔Zig), for both the original **bincode** format and the new **SSZ** format (using `ethereum_ssz` on the Rust side and `ssz.zig` on the Zig side). |
10 | 10 |
|
11 | 11 | **⚠️ Prototype Status**: This is a prototype implementation for research and development purposes. Use at your own risk. |
12 | 12 |
|
13 | 13 | - **Protocol fidelity** – Poseidon2 hashing, ShakePRF domain separation, target sum encoding, and Merkle construction match the Rust reference bit-for-bit. |
14 | 14 | - **Multiple lifetimes** – `2^8`, `2^18`, `2^32` signatures per key with configurable activation windows (defaults to 256 epochs). |
15 | | -- **Interop-first CI & tooling** – `github/workflows/ci.yml` runs `benchmark/benchmark.py`, covering same-language and cross-language checks for lifetimes `2^8` and `2^32`. Locally, test all lifetimes (`2^8`, `2^18`, `2^32`) via `--lifetime` and enable verbose logs only when needed with `BENCHMARK_DEBUG_LOGS=1`. |
| 15 | +- **Interop-first CI & tooling** – `github/workflows/ci.yml` runs `benchmark/benchmark.py`, covering same-language and cross-language checks for lifetimes `2^8` and `2^32` (bincode by default). Locally, you can test all lifetimes (`2^8`, `2^18`, `2^32`) and both encodings by passing `--lifetime` and optionally `--ssz`, and enable verbose logs only when needed with `BENCHMARK_DEBUG_LOGS=1`. |
16 | 16 | - **Performance optimizations** – Parallel tree generation, SIMD optimizations, and AVX-512 support for improved key generation performance (~7.1s for 2^32 with 1024 active epochs). |
17 | 17 | - **Pure Zig** – minimal dependencies, explicit memory management, ReleaseFast-ready. |
18 | 18 |
|
@@ -318,7 +318,12 @@ The repository includes GitHub Actions workflows that automatically exercise **c |
318 | 318 | cd hash-zig |
319 | 319 | zig build lint |
320 | 320 | zig build install -Doptimize=ReleaseFast -Ddebug-logs=false |
321 | | -python3 benchmark/benchmark.py --lifetime "2^8,2^32" |
| 321 | + |
| 322 | +# Bincode encoding (default) |
| 323 | +python3 benchmark/benchmark.py --lifetime "2^8,2^18,2^32" |
| 324 | + |
| 325 | +# SSZ encoding (matches ethereum_ssz on Rust side) |
| 326 | +python3 benchmark/benchmark.py --lifetime "2^8,2^18,2^32" --ssz |
322 | 327 | ``` |
323 | 328 |
|
324 | 329 | - **Windows (PowerShell)**: |
|
0 commit comments