Barretenberg
The ZK-SNARK library at the core of Aztec
|
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::Fq |
using | Fr = typename G1::Fr |
using | affine_element = typename G1::affine_element |
using | element = typename G1::element |
using | key_pair = crypto::schnorr_key_pair< Fr, G1 > |
Public Member Functions | |
SchnorrProofOfPossession ()=default | |
SchnorrProofOfPossession (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() |
Static Private Member Functions | |
static auto | generate_challenge (const affine_element &public_key, const affine_element &R) |
Generate the Fiat-Shamir challenge e = H_reg(G,X,X,R) | |
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
G1 | group over which the key pair was generated |
Hash | function used to derive the Fiat-Shamir challenge |
Definition at line 24 of file proof_of_possession.hpp.
using bb::crypto::SchnorrProofOfPossession< G1, Hash >::affine_element = typename G1::affine_element |
Definition at line 27 of file proof_of_possession.hpp.
using bb::crypto::SchnorrProofOfPossession< G1, Hash >::element = typename G1::element |
Definition at line 28 of file proof_of_possession.hpp.
using bb::crypto::SchnorrProofOfPossession< G1, Hash >::Fq = typename G1::Fq |
Definition at line 25 of file proof_of_possession.hpp.
using bb::crypto::SchnorrProofOfPossession< G1, Hash >::Fr = typename G1::Fr |
Definition at line 26 of file proof_of_possession.hpp.
using bb::crypto::SchnorrProofOfPossession< G1, Hash >::key_pair = crypto::schnorr_key_pair<Fr, G1> |
Definition at line 29 of file proof_of_possession.hpp.
|
default |
|
inline |
Create a new proof of possession for a given account.
account | a key_pair (secret_key, public_key) |
Definition at line 46 of file proof_of_possession.hpp.
|
inlinestaticprivate |
Generate the Fiat-Shamir challenge e = H_reg(G,X,X,R)
public_key | X = secret_key•G |
R | the commitment R = k•G |
Definition at line 103 of file proof_of_possession.hpp.
|
inline |
verifies that an unserialized signature is valid
public_key | the public key for which this proof is intended |
Definition at line 75 of file proof_of_possession.hpp.
std::array<uint8_t, 32> bb::crypto::SchnorrProofOfPossession< G1, Hash >::challenge |
Definition at line 32 of file proof_of_possession.hpp.
Fr bb::crypto::SchnorrProofOfPossession< G1, Hash >::response = Fr::zero() |
Definition at line 34 of file proof_of_possession.hpp.