From c0bc7b6e2d090554c9d940bc3614e089a688503a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 3 Mar 2016 10:33:29 +0100 Subject: Add zabs, zadd, zdiv, zmod, zmodmul, zmodpow, zneg, zpow, zsub, and the newly introduced zmodsqr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- man/zmodmul.3 | 3 ++- man/zmodpow.3 | 1 + man/zmodsqr.3 | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 man/zmodsqr.3 (limited to 'man') diff --git a/man/zmodmul.3 b/man/zmodmul.3 index e27f37c..cbee629 100644 --- a/man/zmodmul.3 +++ b/man/zmodmul.3 @@ -1,6 +1,6 @@ .TH ZMODMUL 3 libzahl .SH NAME -zmodmul - Calculate the modular product of two big integer +zmodmul - Calculate a modular product of two big integer .SH SYNOPSIS .nf #include @@ -34,6 +34,7 @@ It is possible to calculate the modular product with a faster algorithm than calculating the product and than the modulus of that product. .SH SEE ALSO +.BR zmodsqr (3), .BR zmodpow (3), .BR zstr (3), .BR zadd (3), diff --git a/man/zmodpow.3 b/man/zmodpow.3 index 13b6082..f59dc28 100644 --- a/man/zmodpow.3 +++ b/man/zmodpow.3 @@ -34,6 +34,7 @@ It is possible to calculate the modular power with a faster algorithm than calculating the power and than the modulus of that power. .SH SEE ALSO +.BR zmodsqr (3), .BR zmodmul (3), .BR zsqr (3), .BR zstr (3), diff --git a/man/zmodsqr.3 b/man/zmodsqr.3 new file mode 100644 index 0000000..c54cc01 --- /dev/null +++ b/man/zmodsqr.3 @@ -0,0 +1,45 @@ +.TH ZMODSQR 3 libzahl +.SH NAME +zsqr - Calculate a modular square of a big integer +.SH SYNOPSIS +.nf +#include + +void zmodsqr(z_t \fIsquare\fP, z_t \fIinteger\fP, z_t \fImodulator\fP); +.fi +.SH DESCRIPTION +.B zmodsqr +calculates the square of an +.IR integer , +modulus a +.IR modulator , +and stores the result in +.IR square . +That is, +.I square +gets +.IR integer ². +Mod +.IR modulator . +.P +It is safe to call +.B zmodsqr +with non-unique parameters. +.SH RATIONALE +See rationle for +.BR zmodmul (3), +and +.BR zsqr (3). +.SH SEE ALSO +.BR zmodmul (3), +.BR zmodpow (3), +.BR zsqr (3), +.BR zstr (3), +.BR zadd (3), +.BR zsub (3), +.BR zmul (3), +.BR zdiv (3), +.BR zmod (3), +.BR zneg (3), +.BR zabs (3), +.BR zpow (3) -- cgit v1.2.3-70-g09d2