seedelf_cli::schnorr

Function create_proof

Source
pub fn create_proof(
    datum: Register,
    sk: Scalar,
    bound: String,
) -> (String, String)
Expand description

Creates a non-interactive Schnorr proof using the Fiat-Shamir heuristic.

This function generates a proof of knowledge for a secret scalar sk associated with a Register. It uses a random scalar r and applies the Fiat-Shamir heuristic to produce a challenge, which is then used to compute the response.

§Arguments

  • datum - A Register containing the generator and public value as hex-encoded strings.
  • sk - A secret scalar representing the private key.
  • bound - A string representing an additional input for the Fiat-Shamir heuristic.

§Returns

  • (String, String) - A tuple containing:
    • z - The response scalar as a hex-encoded string.
    • g_r - The blinded generator (g^r) as a hex-encoded compressed point.