jf_plonk/
constants.rs

1// Copyright (c) 2022 Espresso Systems (espressosys.com)
2// This file is part of the Jellyfish library.
3
4// You should have received a copy of the MIT License
5// along with the Jellyfish library. If not, see <https://mit-license.org/>.
6
7//! Crate wide constants.
8
9/// Proof-system-related constants.
10///
11/// label for the extra data field to be appended to the transcript during
12/// initialization
13pub(crate) const EXTRA_TRANSCRIPT_MSG_LABEL: &[u8] = b"extra info";
14
15/// Compute the ratio between the quotient polynomial domain size and
16/// the vanishing polynomial domain size
17#[inline]
18pub(crate) const fn domain_size_ratio(n: usize, num_wire_types: usize) -> usize {
19    (num_wire_types * (n + 1) + 2) / n + 1
20}
21
22/// Keccak-256 have a 32 byte state size.
23pub const KECCAK256_STATE_SIZE: usize = 32;