[−][src]Trait zerocaf::traits::ops::Square
Trait that represents the ^2
operation for any
kind of element on the library.
This trait is implemented following the rules that mandate over the Type that is being implemented.
Associated Types
type Output
Required methods
Loading content...Implementors
impl<'a> Square for &'a FieldElement
[src]
type Output = FieldElement
fn square(self) -> FieldElement
[src]
Compute a^2 (mod l)
.
This Square
implementation returns a double precision result.
The result of the standard square is stored on a [u128; 9].
Then, we apply the Montgomery Reduction function to perform
the modulo and the reduction to the FieldElement
format: [u64; 5].