pub struct PowersOfG<E: PairingEngine> { /* private fields */ }
Expand description
A vector of powers of beta G.
Implementations§
Source§impl<E: PairingEngine> PowersOfG<E>
impl<E: PairingEngine> PowersOfG<E>
Sourcepub fn download_powers_for(&self, range: Range<usize>) -> Result<()>
pub fn download_powers_for(&self, range: Range<usize>) -> Result<()>
Download the powers of beta G specified by range
.
Sourcepub fn num_powers(&self) -> usize
pub fn num_powers(&self) -> usize
Returns the number of contiguous powers of beta G starting from the 0-th power.
Sourcepub fn max_num_powers(&self) -> usize
pub fn max_num_powers(&self) -> usize
Returns the maximum possible number of contiguous powers of beta G starting from the 0-th power.
Sourcepub fn powers_of_beta_gamma_g(&self) -> &BTreeMap<usize, E::G1Affine>
pub fn powers_of_beta_gamma_g(&self) -> &BTreeMap<usize, E::G1Affine>
Returns the powers of beta * gamma G.
Sourcepub fn power_of_beta_g(&self, index: usize) -> Result<E::G1Affine>
pub fn power_of_beta_g(&self, index: usize) -> Result<E::G1Affine>
Returns the index
-th power of beta * G.
Sourcepub fn powers_of_beta_g(&self, range: Range<usize>) -> Result<Vec<E::G1Affine>>
pub fn powers_of_beta_g(&self, range: Range<usize>) -> Result<Vec<E::G1Affine>>
Returns the powers of beta * G
that lie within range
.
pub fn negative_powers_of_beta_h(&self) -> &BTreeMap<usize, E::G2Affine>
pub fn prepared_negative_powers_of_beta_h( &self, ) -> Arc<BTreeMap<usize, <E::G2Affine as PairingCurve>::Prepared>>
pub fn beta_h(&self) -> E::G2Affine
Trait Implementations§
Source§impl<E: PairingEngine> CanonicalDeserialize for PowersOfG<E>
impl<E: PairingEngine> CanonicalDeserialize for PowersOfG<E>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>
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,
Source§impl<E: PairingEngine> CanonicalSerialize for PowersOfG<E>
impl<E: PairingEngine> CanonicalSerialize for PowersOfG<E>
fn serialize_with_mode<W: Write>( &self, writer: W, mode: Compress, ) -> Result<(), SerializationError>
fn serialized_size(&self, mode: 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
Source§impl<E: PairingEngine> FromBytes for PowersOfG<E>
impl<E: PairingEngine> FromBytes for PowersOfG<E>
Source§impl<E: PairingEngine> ToBytes for PowersOfG<E>
impl<E: PairingEngine> ToBytes for PowersOfG<E>
Source§impl<E: PairingEngine> Valid for PowersOfG<E>
impl<E: PairingEngine> Valid for PowersOfG<E>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send,
) -> Result<(), SerializationError>where
Self: 'a,
Auto Trait Implementations§
impl<E> !Freeze for PowersOfG<E>
impl<E> !RefUnwindSafe for PowersOfG<E>
impl<E> Send for PowersOfG<E>
impl<E> Sync for PowersOfG<E>
impl<E> Unpin for PowersOfG<E>
impl<E> UnwindSafe for PowersOfG<E>where
<E as PairingEngine>::G2Affine: UnwindSafe + RefUnwindSafe,
<E as PairingEngine>::G1Affine: RefUnwindSafe + UnwindSafe,
<<E as PairingEngine>::G2Affine as PairingCurve>::Prepared: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more