diff options
author | simon <simon@FreeBSD.org> | 2010-03-13 19:30:29 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2010-03-13 19:30:29 +0000 |
commit | 497b0c9195ac00c7946a82ee2fc0145de08b0af4 (patch) | |
tree | c4989f66a77ae6b0dc72244728d436125fb41048 /secure/lib/libcrypto/man/bn_internal.3 | |
parent | 0d816bbd980d8201a2ad23ccd05f7bde16565282 (diff) | |
download | FreeBSD-src-497b0c9195ac00c7946a82ee2fc0145de08b0af4.zip FreeBSD-src-497b0c9195ac00c7946a82ee2fc0145de08b0af4.tar.gz |
Regenerate manual pages for OpenSSL 0.9.8m.
MFC after: 3 weeks
Diffstat (limited to 'secure/lib/libcrypto/man/bn_internal.3')
-rw-r--r-- | secure/lib/libcrypto/man/bn_internal.3 | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/secure/lib/libcrypto/man/bn_internal.3 b/secure/lib/libcrypto/man/bn_internal.3 index fa6fb93..6de24df 100644 --- a/secure/lib/libcrypto/man/bn_internal.3 +++ b/secure/lib/libcrypto/man/bn_internal.3 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "bn_internal 3" -.TH bn_internal 3 "2009-06-14" "0.9.8k" "OpenSSL" +.TH bn_internal 3 "2010-03-13" "0.9.8m" "OpenSSL" .SH "NAME" bn_mul_words, bn_mul_add_words, bn_sqr_words, bn_div_words, bn_add_words, bn_sub_words, bn_mul_comba4, bn_mul_comba8, @@ -212,14 +212,20 @@ debugging and extending the library. They are \fInot\fR to be used by applications. .Sh "The \s-1BIGNUM\s0 structure" .IX Subsection "The BIGNUM structure" -.Vb 7 -\& typedef struct bignum_st +.Vb 1 +\& typedef struct bignum_st BIGNUM; +.Ve +.PP +.Vb 9 +\& struct bignum_st \& { -\& int top; /* number of words used in d */ -\& BN_ULONG *d; /* pointer to an array containing the integer value */ -\& int max; /* size of the d array */ -\& int neg; /* sign */ -\& } BIGNUM; +\& BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ +\& int top; /* Index of last used d +1. */ +\& /* The next are internal book keeping for bn_expand. */ +\& int dmax; /* Size of the d array. */ +\& int neg; /* one if the number is negative */ +\& int flags; +\& }; .Ve .PP The integer value is stored in \fBd\fR, a \fImalloc()\fRed array of words (\fB\s-1BN_ULONG\s0\fR), @@ -227,11 +233,16 @@ least significant word first. A \fB\s-1BN_ULONG\s0\fR can be either 16, 32 or 64 in size, depending on the 'number of bits' (\fB\s-1BITS2\s0\fR) specified in \&\f(CW\*(C`openssl/bn.h\*(C'\fR. .PP -\&\fBmax\fR is the size of the \fBd\fR array that has been allocated. \fBtop\fR +\&\fBdmax\fR is the size of the \fBd\fR array that has been allocated. \fBtop\fR is the number of words being used, so for a value of 4, bn.d[0]=4 and bn.top=1. \fBneg\fR is 1 if the number is negative. When a \fB\s-1BIGNUM\s0\fR is \&\fB0\fR, the \fBd\fR field can be \fB\s-1NULL\s0\fR and \fBtop\fR == \fB0\fR. .PP +\&\fBflags\fR is a bit field of flags which are defined in \f(CW\*(C`openssl/bn.h\*(C'\fR. The +flags begin with \fB\s-1BN_FLG_\s0\fR. The macros BN_set_flags(b,n) and +BN_get_flags(b,n) exist to enable or fetch flag(s) \fBn\fR from \fB\s-1BIGNUM\s0\fR +structure \fBb\fR. +.PP Various routines in this library require the use of temporary \&\fB\s-1BIGNUM\s0\fR variables during their execution. Since dynamic memory allocation to create \fB\s-1BIGNUM\s0\fRs is rather expensive when used in @@ -348,12 +359,12 @@ significant non-zero word plus one when \fBa\fR has shrunk. .Sh "Debugging" .IX Subsection "Debugging" \&\fIbn_check_top()\fR verifies that \f(CW\*(C`((a)\->top >= 0 && (a)\->top -<= (a)\->max)\*(C'\fR. A violation will cause the program to abort. +<= (a)\->dmax)\*(C'\fR. A violation will cause the program to abort. .PP \&\fIbn_print()\fR prints \fBa\fR to stderr. \fIbn_dump()\fR prints \fBn\fR words at \fBd\fR (in reverse order, i.e. most significant word first) to stderr. .PP -\&\fIbn_set_max()\fR makes \fBa\fR a static number with a \fBmax\fR of its current size. +\&\fIbn_set_max()\fR makes \fBa\fR a static number with a \fBdmax\fR of its current size. This is used by \fIbn_set_low()\fR and \fIbn_set_high()\fR to make \fBr\fR a read-only \&\fB\s-1BIGNUM\s0\fR that contains the \fBn\fR low or high words of \fBa\fR. .PP |