Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_keccak_zk_flavor.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Completed, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
13
14namespace bb {
15
17 public:
18 // This flavor runs with ZK Sumcheck
19 static constexpr bool HasZK = true;
20
21 // The number of entities added for ZK (gemini_masking_poly)
22 static constexpr size_t NUM_MASKING_POLYNOMIALS = 1;
23
24 // Determine the number of evaluations of Prover and Libra Polynomials that the Prover sends to the Verifier in
25 // the rounds of ZK Sumcheck.
28 "LIBRA_UNIVARIATES_LENGTH must be equal to UltraKeccakZKFlavor::BATCHED_RELATION_PARTIAL_LENGTH");
29
30 // Override AllEntities to use ZK version (this automatically updates ProverPolynomials and AllValues)
31 template <typename DataType> using AllEntities = UltraFlavor::AllEntities_<DataType, HasZK>;
32
33 // NUM_WITNESS_ENTITIES includes gemini_masking_poly
35 // NUM_ALL_ENTITIES includes gemini_masking_poly
37 // NUM_UNSHIFTED_ENTITIES includes gemini_masking_poly
38 static constexpr size_t NUM_UNSHIFTED_ENTITIES =
40
41 // Size of the final PCS MSM for ZK = non-ZK size + NUM_SMALL_IPA_COMMITMENTS (3)
42 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = VIRTUAL_LOG_N)
43 {
45 }
46
48
49 static_assert(gemini_masking_layout_consistent<UltraKeccakZKFlavor>(),
50 "UltraKeccakZKFlavor gemini masking flag must match its entity layout");
51
54
55 // Override ProverUnivariates and ExtendedEdges to include gemini_masking_poly
58
61};
62} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
A container for storing the partially evaluated multivariates produced by sumcheck.
A container for polynomials handles used by the prover.
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
std::conditional_t< HasZK_, UltraZKFlavor_Generated::AllEntities< DataType >, UltraFlavor_Generated::AllEntities< DataType > > AllEntities_
static constexpr size_t VIRTUAL_LOG_N
VKAndHash_< FF, VerificationKey > VKAndHash
BaseTranscript< Codec, HashFunction > Transcript
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH > ExtendedEdges
static constexpr size_t NUM_MASKING_POLYNOMIALS
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t NUM_UNSHIFTED_ENTITIES
UltraFlavor::AllEntities_< DataType, HasZK > AllEntities
AllEntities< bb::Univariate< FF, LENGTH > > ProverUnivariates
static constexpr size_t NUM_WITNESS_ENTITIES
Wrapper holding a verification key and its precomputed hash.
Definition flavor.hpp:551
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH
Definition grumpkin.hpp:87
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr size_t NUM_SMALL_IPA_COMMITMENTS