pub trait ModSquare<M = Self> {
type Output;
// Required method
fn mod_square(self, m: M) -> Self::Output;
}
Expand description
Squares a number modulo another number $m$. The input must be already reduced modulo $m$.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.
Squares a number modulo another number $m$. The input must be already reduced modulo
$m$.
$f(x, m) = y$, where $x, y < m$ and $x^2 \equiv y \mod m$.
§Worst-case complexity
Constant time and additional memory.
§Panics
Panics if self
is greater than or equal to m
.
§Examples
See here.