Function halo2_proofs::plonk::vk_read

source ยท
pub fn vk_read<C: SerdeCurveAffine, R: Read, ConcreteCircuit: Circuit<C::Scalar>>(
    reader: &mut R,
    format: SerdeFormat,
    k: u32,
    circuit: &ConcreteCircuit,
    compress_selectors: bool
) -> Result<VerifyingKey<C>>
where C::Scalar: SerdePrimeField + FromUniformBytes<64>,
Expand description

Reads a verification key from a buffer.

Reads a curve element from the buffer and parses it according to the format:

  • Processed: Reads a compressed curve element and decompresses it. Reads a field element in standard form, with endianness specified by the PrimeField implementation, and checks that the element is less than the modulus.
  • RawBytes: Reads an uncompressed curve element with coordinates in Montgomery form. Checks that field elements are less than modulus, and then checks that the point is on the curve.
  • RawBytesUnchecked: Reads an uncompressed curve element with coordinates in Montgomery form; does not perform any checks