Skip to main content

Module binding

Module binding 

Source
Expand description

SPEC §6.7 — public-inputs serialization (Fr encoding).

This module is the load-bearing interop point between issuers and verifiers across languages. Any deviation here causes silent verification failures elsewhere. The procedure mirrors the Python SDK’s inherence.binding and the issuer’s encoding inside zk_compiler::zk::binding_hash_to_fr.

Functions§

binding_hash_to_fr
SPEC §6.7.4 — clear the top 3 bits of MSB then reduce mod Fr order.
compute_binding_hash
Build the 97-byte preimage per SPEC §6.7.2 and SHA-256 it.
public_inputs_fr
Final public_inputs vector for Groth16: [decision_fr, binding_fr].