[][src]Struct amcl_wrapper::group_elem_g2::G2Vector

pub struct G2Vector { /* fields omitted */ }

Methods

impl G2Vector[src]

pub fn inner_product_const_time(
    &self,
    b: &FieldElementVector
) -> Result<G2, ValueError>
[src]

Computes inner product of 2 vectors, one of field elements and other of group elements. [a1, a2, a3, ...field elements].[b1, b2, b3, ...group elements] = (a1b1 + a2b2 + a3*b3)

pub fn inner_product_var_time(
    &self,
    b: &FieldElementVector
) -> Result<G2, ValueError>
[src]

pub fn inner_product_var_time_with_ref_vecs(
    group_elems: Vec<&G2>,
    field_elems: Vec<&FieldElement>
) -> Result<G2, ValueError>
[src]

pub fn hadamard_product(&self, b: &Self) -> Result<Self, ValueError>[src]

Calculates Hadamard product of 2 group element vectors. Hadamard product of a and b = a o b = (a0 o b0, a1 o b1, ...). Here o denotes group operation, which in elliptic curve is point addition

pub fn split_at(&self, mid: usize) -> (Self, Self)[src]

pub fn multi_scalar_mul_const_time_naive(
    &self,
    field_elems: &FieldElementVector
) -> Result<G2, ValueError>
[src]

Constant time multi-scalar multiplication. Naive approach computing n scalar multiplications and n-1 additions for n field elements

pub fn multi_scalar_mul_const_time(
    &self,
    field_elems: &FieldElementVector
) -> Result<G2, ValueError>
[src]

Constant time multi-scalar multiplication

pub fn multi_scalar_mul_var_time(
    &self,
    field_elems: &FieldElementVector
) -> Result<G2, ValueError>
[src]

Variable time multi-scalar multiplication

pub fn multi_scalar_mul_var_time_from_ref_vecs(
    group_elems: Vec<&G2>,
    field_elems: Vec<&FieldElement>
) -> Result<G2, ValueError>
[src]

pub fn multi_scalar_mul_var_time_with_precomputation_done(
    lookup_tables: &[G2LookupTable],
    field_elems: Vec<&FieldElement>
) -> Result<G2, ValueError>
[src]

Strauss multi-scalar multiplication. Passing the lookup tables since in lot of cases generators will be fixed

pub fn multi_scalar_mul_const_time_with_precomputation_done(
    group_elem_multiples: &Vec<Vec<G2>>,
    field_elems: &FieldElementVector
) -> Result<G2, ValueError>
[src]

Trait Implementations

impl GroupElementVector<G2> for G2Vector[src]

impl Clone for G2Vector[src]

impl PartialEq<G2Vector> for G2Vector[src]

impl IntoIterator for G2Vector[src]

type Item = G2

The type of the elements being iterated over.

type IntoIter = IntoIter<G2>

Which kind of iterator are we turning this into?

impl From<Vec<G2>> for G2Vector[src]

impl<'_> From<&'_ [G2]> for G2Vector[src]

impl Index<usize> for G2Vector[src]

type Output = G2

The returned type after indexing.

impl IndexMut<usize> for G2Vector[src]

impl Debug for G2Vector[src]

impl Serialize for G2Vector[src]

impl<'de> Deserialize<'de> for G2Vector[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]