Module fastcrypto_vdf::math::parameterized_group
source · Traits§
- Trait implemented by elements of an additive group where the group is parameterized, for example +
fastcrypto_vdf::math::parameterized_group - Rust \ No newline at end of file diff --git a/docs/fastcrypto_vdf/math/parameterized_group/trait.ParameterizedGroupElement.html b/docs/fastcrypto_vdf/math/parameterized_group/trait.ParameterizedGroupElement.html index 424699e15..185209867 100644 --- a/docs/fastcrypto_vdf/math/parameterized_group/trait.ParameterizedGroupElement.html +++ b/docs/fastcrypto_vdf/math/parameterized_group/trait.ParameterizedGroupElement.html @@ -1,4 +1,4 @@ -Module fastcrypto_vdf::
source ·math:: parameterized_group Traits§
- Trait implemented by elements of an additive group where the group is parameterized, for example by the modulus in case of the group being Z mod N or the discriminant in case of class groups.
ParameterizedGroupElement in fastcrypto_vdf::math::parameterized_group - Rust pub trait ParameterizedGroupElement: +
ParameterizedGroupElement in fastcrypto_vdf::math::parameterized_group - Rust \ No newline at end of file +pub trait ParameterizedGroupElement: Sized + Clone + for<'a> Add<&'a Self, Output = Self> @@ -10,9 +10,17 @@ // Required methods fn zero(parameter: &Self::ParameterType) -> Self; fn is_in_group(&self, parameter: &Self::ParameterType) -> bool; + + // Provided method + fn multiply( + &self, + scalar: &BigUint, + parameter: &Self::ParameterType, + ) -> Self { ... } }
Expand description
Trait implemented by elements of an additive group where the group is parameterized, for example by the modulus in case of the group being Z mod N or the discriminant in case of class groups.
Required Associated Types§
source type ParameterType: Serialize
The type of the parameter which uniquely defines this group.
Required Methods§
source fn zero(parameter: &Self::ParameterType) -> Self
Return an instance of the identity element in this group.
source fn is_in_group(&self, parameter: &Self::ParameterType) -> bool
Returns true if this is an element of the group defined by
-parameter
.Object Safety§
This trait is not object safe.Implementors§
source§ impl<'a> ParameterizedGroupElement for RSAGroupElement<'a>
source§ type ParameterType = &'a RSAModulus
Provided Methods§
source fn multiply(&self, scalar: &BigUint, parameter: &Self::ParameterType) -> Self
Compute self * scalar.
+Object Safety§
This trait is not object safe.Implementors§
source§ impl<'a> ParameterizedGroupElement for RSAGroupElement<'a>
source§ type ParameterType = &'a RSAModulus