sha512_to_grumpkin_scalar

Function sha512_to_grumpkin_scalar 

Source
pub fn sha512_to_grumpkin_scalar(
    secret_key: &Fr,
    domain_separator: u32,
) -> GrumpkinScalar
Expand description

Compute SHA-512 of the concatenated inputs and reduce to a Grumpkin scalar.

This is used for master key derivation where uniform distribution is required (not just collision resistance). The 512-bit hash output ensures negligible bias after modular reduction.

Mirrors TS sha512ToGrumpkinScalar([secretKey, domainSeparator]).