Skip to content

Commit 0cdaa9f

Browse files
committed
docs: update hash_to_fr documentation to clarify multi-field element hashing
1 parent 833b1c4 commit 0cdaa9f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

provekit/groth16/src/prover.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,10 @@ pub fn hash_to_fr(msg: &[u8], dst: &[u8]) -> Result<Fr> {
306306
/// Hash bytes with a domain separator to produce multiple field elements.
307307
///
308308
/// Single-root counter chain:
309+
/// ```text
309310
/// root = keccak256(dst || msg)
310311
/// out[i] = keccak256(root || I2OSP(i, 1)) reduced mod R
312+
/// ```
311313
///
312314
/// One outer hash over the (often large) `msg`, then N cheap 33-byte hashes
313315
/// — keeps total work close to a single keccak even for N up to ~32.

0 commit comments

Comments
 (0)