libzahl

big integer library
git clone git://git.suckless.org/libzahl
Log | Files | Refs | README | LICENSE

zmodsqr.3 (747B)


      1 .TH ZMODSQR 3 libzahl
      2 .SH NAME
      3 zsqr - Calculate a modular square of a big integer
      4 .SH SYNOPSIS
      5 .nf
      6 #include <zahl.h>
      7 
      8 void zmodsqr(z_t \fIsquare\fP, z_t \fIinteger\fP, z_t \fImodulator\fP);
      9 .fi
     10 .SH DESCRIPTION
     11 .B zmodsqr
     12 calculates the square of an
     13 .IR integer ,
     14 modulus a
     15 .IR modulator ,
     16 and stores the result in
     17 .IR square .
     18 That is,
     19 .I square
     20 gets
     21 .IR integer ².
     22 Mod
     23 .IR modulator .
     24 .P
     25 It is safe to call
     26 .B zmodsqr
     27 with non-unique parameters.
     28 .P
     29 See
     30 .BR zmod (3)
     31 for details on modulation.
     32 .SH RATIONALE
     33 See rationle for
     34 .BR zmodmul (3),
     35 and
     36 .BR zsqr (3).
     37 .SH SEE ALSO
     38 .BR zmodmul (3),
     39 .BR zmodpow (3),
     40 .BR zsqr (3),
     41 .BR zstr (3),
     42 .BR zadd (3),
     43 .BR zsub (3),
     44 .BR zmul (3),
     45 .BR zdiv (3),
     46 .BR zmod (3),
     47 .BR zneg (3),
     48 .BR zabs (3),
     49 .BR zpow (3)