Commit Graph

7 Commits

Author SHA1 Message Date
Daira Emma Hopwood 58e797da93 feat: added `to/from_bytes` for `ProvingKey` and `VerifyingKey`
* add `pack`/`unpack` helper functions between `&[bool]` and `u8`.

Extracted from 2c7f288932

Co-authored-by: Carlos Pérez <37264926+CPerezz@users.noreply.github.com>
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-05-01 16:34:40 +01:00
Daira Emma Hopwood bae30538b5 Apply review suggestions for VerifyingKey serialization:
* write an initial 0x01 version byte, and check it on read;
* use little-endian byte order for lengths;
* add length fields before the selectors and the permutation commitments,
  and check their consistency with the expected lengths on read;
* do not write an extra byte for a selector bit vector if the number of
  bits is a multiple of 8;
* ensure that original I/O errors are preserved.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-05-01 11:00:53 +01:00
Nalin Bhardwaj 0ca2296921 Vkey serialisation
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-05-01 10:48:24 +01:00
Jack Grigg f852be62a8 halo2_proofs: Remove unused imports 2022-09-09 17:43:43 +00:00
parazyd a6d7785ddc
plonk: Derive Clone for VerifyingKey and ProvingKey.
Signed-off-by: parazyd <parazyd@dyne.org>
2022-04-26 14:08:11 +02:00
Sean Bowe f46d77763e
Remove logic for reading and writing VerificationKey to/from buffers. 2022-03-16 14:19:33 -06:00
Jack Grigg 3c6558f049 Move `halo2` code into `halo2_proofs` crate 2022-01-20 18:50:43 +00:00