Skip to content

Releases: blockblaz/hash-zig

hash-zig v1.1.3

03 Dec 21:30

Choose a tag to compare

  • Code cleanup and improved code quality
  • Fix whitespace formatting
  • Skip loading pre-generated keys for 2^8 lifetime in sign command

hash-zig v1.1.2

03 Dec 20:28

Choose a tag to compare

  • Fixed SSZ serialization and deserialization issues
  • Security and robustness improvements
  • New inspect command and pre-generated keys testing
  • Performance optimizations
  • Various bug fixes

hash-zig v1.1.1

02 Dec 15:14

Choose a tag to compare

This release addresses a memory leak issue in signature operations.

  • Resolved memory leak in signature operations
  • Removed outdated memory leak documentation

hash-zig v1.1.0

02 Dec 11:39

Choose a tag to compare

Added

  • SSZ (Simple Serialize) Support: Full implementation of SSZ serialization/deserialization for all signature scheme types
    • Added ssz.zig dependency for Ethereum-compatible SSZ encoding
    • Implemented SSZ methods for PublicKey, SecretKey, Signature, and MerklePath types
    • Cross-language compatibility tests now pass for both bincode and SSZ encodings
    • CI pipeline updated to test SSZ encoding by default alongside bincode
    • Benchmark tools support --ssz flag for testing SSZ encoding

Fixed

  • Corrected rho serialization for cross-language compatibility
  • Fixed 2^18 SSZ cross-language compatibility issues
  • Fixed 2^32 SSZ cross-language compatibility and locked Rust toolchain
  • Updated CI to use Rust nightly toolchain matching rust-toolchain.toml

Changed

  • README updated with SSZ support documentation
  • Cross-language compatibility tools now support both bincode and SSZ encodings
  • CI switched to SSZ as default encoding for compatibility tests

Removed

  • Cleaned up unused Rust code from previous implementations

hash-zig v1.0.0

01 Dec 19:18

Choose a tag to compare

🎉 First Stable Release: hash-zig v1.0.0

Pure Zig implementation of Generalized XMSS signatures with wire-compatible behavior against the Rust reference implementation (leanSig).

✨ Key Features

  • 🔗 Cross-Language Compatibility: All cross-language compatibility tests pass for lifetimes 2^8 and 2^32 in both directions (Rust↔Zig)
  • ⚡ 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)
  • 🎯 Protocol Fidelity: Poseidon2 hashing, ShakePRF domain separation, target sum encoding, and Merkle construction match the Rust reference bit-for-bit
  • 📦 Multiple Lifetimes: Support for 2^8, 2^18, and 2^32 signatures per key with configurable activation windows (defaults to 256 epochs)
  • 🚀 Pure Zig: Minimal dependencies, explicit memory management, ReleaseFast-ready

🛠️ Technical Highlights

  • Automatic AVX-512 Detection: Build script automatically detects AVX-512 support and configures SIMD width
  • Stack Allocation Optimizations: Improved sign and verification performance with stack allocation
  • Parallel Chain Computation: Optimized verification performance with parallel chain computation
  • Memory Optimizations: Buffer reuse, copy optimizations, and improved thread pool management

📋 Requirements

  • Zig 0.14.1 or later
  • Compatible with Rust leanSig implementation for cross-language interoperability

📖 Installation

// build.zig.zon
.{
    .name = "my_project",
    .version = "0.1.0",
    .dependencies = .{
        .@"hash-zig" = .{
            .url = "https://github.com/ch4r10t33r/hash-zig/archive/refs/tags/v1.0.0.tar.gz",
            .hash = "...", // generated by zig build
        },
    },
}

⚠️ Note

This is a prototype implementation for research and development purposes. Use at your own risk.

📚 Documentation

See README.md for detailed documentation, examples, and benchmarks.