pub trait Group: Eq + 'static + Sized + CanonicalSerialize + CanonicalDeserialize + Copy + Clone + Default + Send + Sync + Hash + Debug + Display + UniformRand + Zeroize + Zero + Neg<Output = Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + Mul<Self::ScalarField, Output = Self> + AddAssign<Self> + SubAssign<Self> + MulAssign<Self::ScalarField> + for<'a> Add<&'a Self, Output = Self> + for<'a> Sub<&'a Self, Output = Self> + for<'a> Mul<&'a Self::ScalarField, Output = Self> + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + for<'a> MulAssign<&'a Self::ScalarField> + Sum<Self> + for<'a> Sum<&'a Self> {
type ScalarField: PrimeField;
// Required methods
fn generator() -> Self;
fn double_in_place(&mut self) -> &mut Self;
fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self;
// Provided methods
fn double(&self) -> Self { ... }
fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self { ... }
}
Expand description
Represents (elements of) a group of prime order r
.
Required Associated Types§
sourcetype ScalarField: PrimeField
type ScalarField: PrimeField
The scalar field F_r
, where r
is the order of this group.
Required Methods§
sourcefn double_in_place(&mut self) -> &mut Self
fn double_in_place(&mut self) -> &mut Self
Double self
in place.
sourcefn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self
fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self
Performs scalar multiplication of this element.
Provided Methods§
sourcefn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
Computes other * self
, where other
is a big-endian
bit representation of some integer.