Struct sp_core::bandersnatch::ring_vrf::KZG
pub struct KZG { /* private fields */ }
Implementations§
§impl KZG
impl KZG
pub fn insecure_kzg_setup<R>( seed: [u8; 32], domain_size: u32, rng: &mut R ) -> KZGwhere R: Rng,
pub fn testing_kzg_setup(preseed: [u8; 32], domain_size: u32) -> KZG
pub fn max_keyset_size(&self) -> usize
pub fn prover_key( &self, pks: Vec<Affine<BandersnatchConfig>, Global> ) -> ProverKey<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, Affine<BandersnatchConfig>>
pub fn verifier_key( &self, pks: Vec<Affine<BandersnatchConfig>, Global> ) -> VerifierKey<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>>
pub fn init_ring_prover(
&self,
prover_key: ProverKey<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, Affine<BandersnatchConfig>>,
k: usize
) -> RingProver<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, BandersnatchConfig>
pub fn init_ring_prover( &self, prover_key: ProverKey<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, Affine<BandersnatchConfig>>, k: usize ) -> RingProver<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, BandersnatchConfig>
k
is the prover secret index in [0..keyset_size).
pub fn init_ring_verifier( &self, verifier_key: VerifierKey<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>> ) -> RingVerifier<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config>>, BandersnatchConfig>
Trait Implementations§
§impl CanonicalDeserialize for KZG
impl CanonicalDeserialize for KZG
§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<KZG, SerializationError>where
R: Read,
fn deserialize_with_mode<R>( reader: R, compress: Compress, validate: Validate ) -> Result<KZG, SerializationError>where R: Read,
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_compressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
§impl CanonicalSerialize for KZG
impl CanonicalSerialize for KZG
§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>( &self, writer: W, compress: Compress ) -> Result<(), SerializationError>where W: Write,
The general serialize method that takes in customization flags.
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn uncompressed_size(&self) -> usize
Auto Trait Implementations§
impl RefUnwindSafe for KZG
impl Send for KZG
impl Sync for KZG
impl Unpin for KZG
impl UnwindSafe for KZG
Blanket Implementations§
§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere T: CanonicalSerialize,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.