barretenberg
Loading...
Searching...
No Matches
Static Public Member Functions | Protected Types | List of all members
proof_system::plonk::widget::getters::BaseGetter< Field, Transcript, Settings, num_widget_relations > Class Template Reference

Implements loading challenges from the transcript and computing powers of α, which is later used in widgets. More...

#include <transition_widget.hpp>

Inheritance diagram for proof_system::plonk::widget::getters::BaseGetter< Field, Transcript, Settings, num_widget_relations >:
proof_system::plonk::widget::getters::EvaluationGetter< Field, Transcript, Settings, num_widget_relations > proof_system::plonk::widget::getters::FFTGetter< Field, Transcript, Settings, num_widget_relations >

Static Public Member Functions

static challenge_array get_challenges (const Transcript &transcript, const Field &alpha_base, uint8_t required_challenges)
 
static Field update_alpha (const challenge_array &challenges, const size_t num_independent_relations)
 

Protected Types

typedef containers::challenge_array< Field, num_widget_relations > challenge_array
 

Detailed Description

template<class Field, class Transcript, class Settings, size_t num_widget_relations>
class proof_system::plonk::widget::getters::BaseGetter< Field, Transcript, Settings, num_widget_relations >

Implements loading challenges from the transcript and computing powers of α, which is later used in widgets.

Template Parameters
FieldBase field
TranscriptTranscript class
SettingsConfiguration
num_widget_relationsHow many powers of α are needed

Member Function Documentation

◆ get_challenges()

template<class Field , class Transcript , class Settings , size_t num_widget_relations>
static challenge_array proof_system::plonk::widget::getters::BaseGetter< Field, Transcript, Settings, num_widget_relations >::get_challenges ( const Transcript &  transcript,
const Field &  alpha_base,
uint8_t  required_challenges 
)
inlinestatic

Create a challenge array from transcript. Loads alpha, beta, gamma, eta, zeta and nu and calculates powers of alpha.

Parameters
transcriptTranscript to get challenges from.
alpha_basealpha to some power (depends on previously used widgets).
required_challengesChallenge bitmask, which shows when the function should fail.
Returns
A structure with an array of challenge values and powers of alpha.

There are several issues we need to address here:

  1. We can't just set the value to 0. In case of a typo this could lead to a vulnerability
  2. We can't fail when there is no challenge, because getters get activated at various phases
  3. There is no way for us to check accesses in the challenge_array (it would degrade speed)

One of the mitigations we use is we force the transition widget kernel to have members that describe the necessary challenges for quotient polynomial construction and for kate update. We then take them and submit to the get_challenges function. This allows us to catch misuse, but only if the developer is prudent.

Since we can't enforce anything really we introduced a simple mitigation: The challenges that aren't in the transcript are replaced by random values.

The value each of the widget uses and the value the verifier uses will differ. As a result, proof will fail if some widget uses an uninitialized challenge. *


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