summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-01-28 22:58:14 +0000
committermarkm <markm@FreeBSD.org>2003-01-28 22:58:14 +0000
commitecacd12edb99d739f012912174233320c5f8262f (patch)
treeb81a83b72c76fb8541cf06d3e99d92f1c0fc0888 /secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
parentb159341ed957acbcab2f9bdd46c0b82ecd2e7864 (diff)
downloadFreeBSD-src-ecacd12edb99d739f012912174233320c5f8262f.zip
FreeBSD-src-ecacd12edb99d739f012912174233320c5f8262f.tar.gz
Update for OpenSSL 0.9.7. No assembler code at the moment. This
will follow.
Diffstat (limited to 'secure/lib/libcrypto/man/BN_mod_mul_montgomery.3')
-rw-r--r--secure/lib/libcrypto/man/BN_mod_mul_montgomery.325
1 files changed, 15 insertions, 10 deletions
diff --git a/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 b/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
index 28702ce..1e6a1fa 100644
--- a/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
+++ b/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Jul 30 09:21:20 2002
+.\" Mon Jan 13 19:27:23 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "BN_mod_mul_montgomery 3"
-.TH BN_mod_mul_montgomery 3 "0.9.6e" "2000-11-12" "OpenSSL"
+.TH BN_mod_mul_montgomery 3 "0.9.7" "2003-01-13" "OpenSSL"
.UC
.SH "NAME"
BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init,
@@ -180,22 +180,23 @@ using the same modulus.
\&\fIBN_MONT_CTX_new()\fR allocates and initializes a \fB\s-1BN_MONT_CTX\s0\fR structure.
\&\fIBN_MONT_CTX_init()\fR initializes an existing uninitialized \fB\s-1BN_MONT_CTX\s0\fR.
.PP
-\&\fIBN_MONT_CTX_set()\fR sets up the \fBmont\fR structure from the modulus \fBm\fR
+\&\fIBN_MONT_CTX_set()\fR sets up the \fImont\fR structure from the modulus \fIm\fR
by precomputing its inverse and a value R.
.PP
-\&\fIBN_MONT_CTX_copy()\fR copies the \fB\s-1BN_MONT_CTX\s0\fR \fBfrom\fR to \fBto\fR.
+\&\fIBN_MONT_CTX_copy()\fR copies the \fB\s-1BN_MONT_CTX\s0\fR \fIfrom\fR to \fIto\fR.
.PP
\&\fIBN_MONT_CTX_free()\fR frees the components of the \fB\s-1BN_MONT_CTX\s0\fR, and, if
it was created by \fIBN_MONT_CTX_new()\fR, also the structure itself.
.PP
-\&\fIBN_mod_mul_montgomery()\fR computes Mont(\fBa\fR,\fBb\fR):=\fBa\fR*\fBb\fR*R^\-1 and places
-the result in \fBr\fR.
+\&\fIBN_mod_mul_montgomery()\fR computes Mont(\fIa\fR,\fIb\fR):=\fIa\fR*\fIb\fR*R^\-1 and places
+the result in \fIr\fR.
.PP
-\&\fIBN_from_montgomery()\fR performs the Montgomery reduction \fBr\fR = \fBa\fR*R^\-1.
+\&\fIBN_from_montgomery()\fR performs the Montgomery reduction \fIr\fR = \fIa\fR*R^\-1.
.PP
-\&\fIBN_to_montgomery()\fR computes Mont(\fBa\fR,R^2), i.e. \fBa\fR*R.
+\&\fIBN_to_montgomery()\fR computes Mont(\fIa\fR,R^2), i.e. \fIa\fR*R.
+Note that \fIa\fR must be non-negative and smaller than the modulus.
.PP
-For all functions, \fBctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for
+For all functions, \fIctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for
temporary variables.
.PP
The \fB\s-1BN_MONT_CTX\s0\fR structure is defined as follows:
@@ -222,9 +223,13 @@ on error.
.PP
For the other functions, 1 is returned for success, 0 on error.
The error codes can be obtained by ERR_get_error(3).
+.SH "WARNING"
+.IX Header "WARNING"
+The inputs must be reduced modulo \fBm\fR, otherwise the result will be
+outside the expected range.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-bn(3), err(3), BN_add(3),
+bn(3), ERR_get_error(3), BN_add(3),
BN_CTX_new(3)
.SH "HISTORY"
.IX Header "HISTORY"
OpenPOWER on IntegriCloud