46 auto deserialize_point = [&]() {
48 NativeG1::PUBLIC_INPUTS_SIZE);
49 idx += NativeG1::PUBLIC_INPUTS_SIZE;
50 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
74 auto serialize_fq = [&](
const NativeFq& fq_val) {
75 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
78 proof[idx++] =
NativeFF(val & LIMB_MASK);
79 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
82 auto serialize_point = [&](
const NativeG1& point) {
83 if (point.is_point_at_infinity()) {
84 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
88 serialize_fq(point.x);
89 serialize_fq(point.y);
132 auto deserialize_point = [&]() {
134 NativeG1::PUBLIC_INPUTS_SIZE);
135 idx += NativeG1::PUBLIC_INPUTS_SIZE;
136 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
143 commitment = deserialize_point();
158 auto serialize_fq = [&](
const NativeFq& fq_val) {
159 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
162 proof[idx++] =
NativeFF(val & LIMB_MASK);
163 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
166 auto serialize_point = [&](
const NativeG1& point) {
167 if (point.is_point_at_infinity()) {
168 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
172 serialize_fq(point.x);
173 serialize_fq(point.y);
181 serialize_point(commitment);
217 auto deserialize_point = [&]() {
219 NativeG1::PUBLIC_INPUTS_SIZE);
220 idx += NativeG1::PUBLIC_INPUTS_SIZE;
221 return FrCodec::deserialize_from_fields<NativeG1>(limbs);
240 auto serialize_fq = [&](
const NativeFq& fq_val) {
241 constexpr uint64_t NUM_LIMB_BITS = 2 * NUM_LIMB_BITS_IN_FIELD_SIMULATION;
244 proof[idx++] =
NativeFF(val & LIMB_MASK);
245 proof[idx++] =
NativeFF((val >> NUM_LIMB_BITS) & LIMB_MASK);
248 auto serialize_point = [&](
const NativeG1& point) {
249 if (point.is_point_at_infinity()) {
250 for (
size_t i = 0; i < NativeG1::PUBLIC_INPUTS_SIZE; ++i) {
254 serialize_fq(point.x);
255 serialize_fq(point.y);
typename Group::affine_element AffineElement
Native representation and serde for AppIO public inputs.
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize AppIO back to a proof vector.
NativePairingPoints pairing_inputs
static AppIOSerde from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize AppIO from a proof vector.
static constexpr size_t PUBLIC_INPUTS_SIZE
curve::BN254::AffineElement NativeG1
Native representation and serde for HidingKernelIO public inputs.
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize HidingKernelIO back to a proof vector.
static constexpr size_t PUBLIC_INPUTS_SIZE
std::array< NativeG1, MegaCircuitBuilder::NUM_WIRES > NativeTableCommitments
curve::BN254::AffineElement NativeG1
NativeG1 kernel_return_data
NativeTableCommitments ecc_op_tables
NativePairingPoints pairing_inputs
static HidingKernelIOSerde from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize HidingKernelIO from a proof vector.
For test purposes only: Native representation and serde for KernelIO public inputs
NativeFF output_hn_accum_hash
NativePairingPoints pairing_inputs
curve::BN254::AffineElement NativeG1
static constexpr size_t PUBLIC_INPUTS_SIZE
void to_proof(std::vector< NativeFF > &proof, size_t num_public_inputs) const
Serialize KernelIO back to a proof vector.
NativeG1 kernel_return_data
static KernelIOSerde from_proof(const std::vector< NativeFF > &proof, size_t num_public_inputs)
Deserialize KernelIO from a proof vector.
field< Bn254FrParams > fr
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static constexpr field zero()