diff options
author | Ulf Möller <ulf@openssl.org> | 2000-02-06 16:56:59 +0100 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-02-06 16:56:59 +0100 |
commit | cae55bfc68bed0a2d562891f11a75bf2145eb81e (patch) | |
tree | 4f36b19f130cee733b684d2827dfd65ae28f9626 /doc/crypto/BN_mod_mul_reciprocal.pod | |
parent | Support for MacOS X (Rhapsody) is added. Also get rid of volatile (diff) | |
download | openssl-cae55bfc68bed0a2d562891f11a75bf2145eb81e.tar.xz openssl-cae55bfc68bed0a2d562891f11a75bf2145eb81e.zip |
Improve bntest slightly, and fix another bug in the BN library.
Diffstat (limited to 'doc/crypto/BN_mod_mul_reciprocal.pod')
-rw-r--r-- | doc/crypto/BN_mod_mul_reciprocal.pod | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/crypto/BN_mod_mul_reciprocal.pod b/doc/crypto/BN_mod_mul_reciprocal.pod index 74d1cc4e5b..42a3c0db7e 100644 --- a/doc/crypto/BN_mod_mul_reciprocal.pod +++ b/doc/crypto/BN_mod_mul_reciprocal.pod @@ -16,6 +16,9 @@ reciprocal int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *m, BN_CTX *ctx); + int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *a, BN_RECP_CTX *recp, + BN_CTX *ctx); + int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_RECP_CTX *recp, BN_CTX *ctx); @@ -33,9 +36,13 @@ BN_RECP_CTX_init() initializes an existing uninitialized B<BN_RECP>. BN_RECP_CTX_free() frees the components of the B<BN_RECP>, and, if it was created by BN_RECP_CTX_new(), also the structure itself. -BN_RECP_CTX_set() computes 1/B<m> and shifts it left by -BN_num_bits(B<m>)+1 to make it an integer. The result and the -number of bits it was shifted left are stored in B<recp>. +BN_RECP_CTX_set() stores B<m> in B<recp> and sets it up for computing +1/B<m> and shifting it left by BN_num_bits(B<m>)+1 to make it an +integer. The result and the number of bits it was shifted left will +later be stored in B<recp>. + +BN_div_recp() divides B<a> by B<m> using B<recp>. It places the quotient +in B<dv> and the remainder in B<rem>. The B<BN_RECP_CTX> structure is defined as follows: |