Function halo2_proofs::plonk::pk_read

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

Reads a proving key from a buffer. Does so by reading verification key first, and then deserializing the rest of the file into the remaining proving key data.

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