Skip to main content

Module common

Module common 

Source
Expand description

Common cryptographic utility functions.

This module provides implementations of various cryptographic operations used throughout the VRF schemes, including challenge generation, nonce derivation, and delinearization.

Structs§

ExactChain
Wrapper around Chain that implements ExactSizeIterator.

Constants§

CHALLENGE_LEN
Challenge encoding length in bytes (128-bit security).

Functions§

challenge
Challenge generation inspired by RFC-9381 section 5.4.3.
challenge_scalar
expanded_scalar_len
Number of bytes to squeeze for an unbiased scalar via from_le_bytes_mod_order.
nonce
Deterministic nonce generation inspired by RFC-8032 section 5.1.6.
nonce_scalar
point_to_hash
Point-to-hash inspired by RFC-9381 section 5.2.