barretenberg
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
crypto::schnorr::ProofOfPossession< G1, Hash > Struct Template Reference

A proof of possession is a Schnorr proof of knowledge of a secret key corresponding to a given public key. More...

#include <proof_of_possession.hpp>

Public Types

using Fq = typename G1::coordinate_field
 
using Fr = typename G1::subgroup_field
 
using affine_element = typename G1::affine_element
 
using element = typename G1::element
 
using key_pair = crypto::schnorr::key_pair< Fr, G1 >
 

Public Member Functions

 ProofOfPossession (const key_pair &account)
 Create a new proof of possession for a given account.
 
bool verify (const affine_element &public_key) const
 verifies that an unserialized signature is valid
 

Public Attributes

std::array< uint8_t, 32 > challenge
 
Fr response = Fr::zero()
 

Detailed Description

template<typename G1, typename Hash>
struct crypto::schnorr::ProofOfPossession< G1, Hash >

A proof of possession is a Schnorr proof of knowledge of a secret key corresponding to a given public key.

This implementation follows the specification detailed in https://eprint.iacr.org/2021/1375.pdf

Template Parameters
G1group over which the key pair was generated
Hashfunction used to derive the Fiat-Shamir challenge

Constructor & Destructor Documentation

◆ ProofOfPossession()

template<typename G1 , typename Hash >
crypto::schnorr::ProofOfPossession< G1, Hash >::ProofOfPossession ( const key_pair account)
inline

Create a new proof of possession for a given account.

Warning
Proofs are not deterministic.
Parameters
accounta key_pair (secret_key, public_key)

Member Function Documentation

◆ verify()

template<typename G1 , typename Hash >
bool crypto::schnorr::ProofOfPossession< G1, Hash >::verify ( const affine_element &  public_key) const
inline

verifies that an unserialized signature is valid

Parameters
public_keythe public key for which this proof is intended
Returns
whether the proof is correct

The documentation for this struct was generated from the following file: