Skip to content

Commit

Permalink
Add missing APIs&Macros to manpage
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
  • Loading branch information
sjaeckel committed Jun 21, 2023
1 parent c166d76 commit 733cb22
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions doc/tommath.3
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,24 @@ Frees the heap memory of \fBa\fP.
Returns the position of the lowest bit set.
.in -1i

.LP
.BI "mp_ord mp_cmp(const mp_int *" a ", const mp_int *" b ")"
.in 1i
Compare \fBa\fP to \fBb\fP.
.in -1i

.LP
.BI "mp_ord mp_cmp_d(const mp_int *" a ", mp_digit " b ")"
.in 1i
Compare \fBa\fP to a single digit \fBb\fP.
.in -1i

.LP
.BI "mp_ord mp_cmp_mag(const mp_int *" a ", const mp_int *" b ")"
.in 1i
Compares the absolute values of \fBa\fP and \fBb\fP.
.in -1i

.LP
.BI "mp_err mp_complement(const mp_int *" a ", mp_int *" b ")"
.in 1i
Expand Down Expand Up @@ -279,6 +297,7 @@ mp_get_i64;5543444065158278130
mp_get_mag_u32;3221335026
mp_get_mag_u64;5543444065158278130
mp_get_l;5543444065158278130
mp_get_ul;5543444065158278130
mp_get_mag_ul;5543444065158278130
.TE
.in -1i
Expand Down Expand Up @@ -315,6 +334,14 @@ Returns an unsigned 64 bit integer from big-integer \fBa\fP.
\fBNOTE:\fP This function is truncating. See \fBmp_get_i32\fP for details.
.in -1i

.LP
.BI "unsigned long mp_get_mag_ul (const mp_int *" a ")"
.in 1i
Returns an unsigned long from big-integer \fBa\fP.
.br
\fBNOTE:\fP This function is truncating. See \fBmp_get_i32\fP for details.
.in -1i

.LP
.BI "uint32_t mp_get_u32 (const mp_int *" a ")"
.in 1i
Expand All @@ -327,6 +354,12 @@ Convenience macro for \fBmp_get_mag_u32()\fP.
Convenience macro for \fBmp_get_mag_u64()\fP.
.in -1i

.LP
.BI "unsigned long mp_get_ul (const mp_int *" a ")"
.in 1i
Convenience macro for \fBmp_get_mag_ul()\fP.
.in -1i

.LP
.BI "mp_err mp_grow (mp_int *" a ", int " size ")"
.in 1i
Expand Down Expand Up @@ -471,6 +504,12 @@ Sets \fBret\fP to \fBtrue\fP if \fBarg\fP is a square, \fBfalse\fP otherwise.
Returns \fBtrue\fP if \fBa = 0\fP, \fBfalse\fP otherwise.
.in -1i

.LP
.BI "bool mp_isone(mp_int *" a ")"
.in 1i
Returns \fBtrue\fP if \fBa = 1\fP, \fBfalse\fP otherwise.
.in -1i

.LP
.BI "mp_err mp_kronecker (const mp_int *" a ", const mp_int *" p ", int *" c ")"
.in 1i
Expand Down Expand Up @@ -717,6 +756,14 @@ typedef enum {
.in -1.5i
.in -1i

.LP
.BI "mp_err mp_prime_fermat(const mp_int *" a ", const mp_int *" b ", bool *" result ")"
.in 1i
Performs one Fermat test of \fBa\fP using base \fBb\fP.
.br
Sets \fBresult\fP to \fBtrue\fP if \fBa\fP is probably prime, \fBfalse\fP if composite.
.in -1i

.LP
.BI "mp_err mp_prime_strong_lucas_selfridge(const mp_int *" a ", bool *" result ")"
.in 1i
Expand Down

0 comments on commit 733cb22

Please sign in to comment.