SSZ
  • Home
  • Visualizer
  • Documentation
    • Specs
    • Merkle Proofs
  • Overview
    • Introduction
    • Typing
    • Serialization
    • Deserialization
    • Merkleization
    • Merkle Proofs
  • Implementations
    • Python
    • TypeScript
    • Go
    • Dafny
    • Java
    • Nim
    • C#
    • Zig
    • Rust
    • Swift
  • GitHub
Site Map
  • Home
  • Visualizer
  • Documentation
    • Specs
    • Merkle Proofs
  • Overview
    • Introduction
      • Development
      • SSZ in Eth2
    • Typing
      • Basic Types
      • Composite Types
      • Bitfields
    • Serialization
      • Simple Objects
      • Composite Objects
    • Deserialization
      • Fixed-Size Objects
      • Variable-Size Objects
    • Merkleization
      • Hashing
      • Merkleize
      • Merkleize Helper Functions
      • hash_tree_root
    • Merkle Proofs
      • Helper Functions
      • Generalized Merkle Tree Indices
      • SSZ object to index
      • Helpers for generalized_indices
      • Merkle Multiproofs
      • Summaries and Expansions
  • Implementations
    • Python
    • TypeScript
    • Go
    • Dafny
    • Java
    • Nim
    • C#
    • Zig
    • Rust
    • Swift

Hashing

SSZ utilizes the SHA-256 hash function.

The standard specification for SHA-256 can be found in FIPS 180-4.


Hashing primitive for binary trees:

H(a: bytes32, b: bytes32) -> SHA_256(a ++ b)

  • Where ++ is concatenation, i.e. tightly packing a and b into 64 bytes.
  • And SHA_256 is run on the standard unmodified pre-state, and returns the digest after writing and processing the above 64 bytes.
Previous
Next




    • Hashing