diff options
| author | beck <> | 2000-12-15 02:58:47 +0000 | 
|---|---|---|
| committer | beck <> | 2000-12-15 02:58:47 +0000 | 
| commit | 9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch) | |
| tree | 5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libcrypto/bn/bn.h | |
| parent | e131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff) | |
| download | openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2 openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip | |
openssl-engine-0.9.6 merge
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/bn/bn.h | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index 009b0eb685..1eb8395b25 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | #ifndef HEADER_BN_H | 59 | #ifndef HEADER_BN_H | 
| 60 | #define HEADER_BN_H | 60 | #define HEADER_BN_H | 
| 61 | 61 | ||
| 62 | #ifndef WIN16 | 62 | #ifndef NO_FP_API | 
| 63 | #include <stdio.h> /* FILE */ | 63 | #include <stdio.h> /* FILE */ | 
| 64 | #endif | 64 | #endif | 
| 65 | #include <openssl/opensslconf.h> | 65 | #include <openssl/opensslconf.h> | 
| @@ -233,7 +233,7 @@ typedef struct bignum_st | |||
| 233 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | 233 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | 
| 234 | int top; /* Index of last used d +1. */ | 234 | int top; /* Index of last used d +1. */ | 
| 235 | /* The next are internal book keeping for bn_expand. */ | 235 | /* The next are internal book keeping for bn_expand. */ | 
| 236 | int max; /* Size of the d array. */ | 236 | int dmax; /* Size of the d array. */ | 
| 237 | int neg; /* one if the number is negative */ | 237 | int neg; /* one if the number is negative */ | 
| 238 | int flags; | 238 | int flags; | 
| 239 | } BIGNUM; | 239 | } BIGNUM; | 
| @@ -364,6 +364,8 @@ int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | |||
| 364 | const BIGNUM *m,BN_CTX *ctx); | 364 | const BIGNUM *m,BN_CTX *ctx); | 
| 365 | int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 365 | int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | 
| 366 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 366 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | 
| 367 | int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, | ||
| 368 | const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
| 367 | int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, | 369 | int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, | 
| 368 | BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); | 370 | BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); | 
| 369 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, | 371 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, | 
| @@ -433,9 +435,9 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, | |||
| 433 | 435 | ||
| 434 | /* library internal functions */ | 436 | /* library internal functions */ | 
| 435 | 437 | ||
| 436 | #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->max)?\ | 438 | #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ | 
| 437 | (a):bn_expand2((a),(bits)/BN_BITS2+1)) | 439 | (a):bn_expand2((a),(bits)/BN_BITS2+1)) | 
| 438 | #define bn_wexpand(a,words) (((words) <= (a)->max)?(a):bn_expand2((a),(words))) | 440 | #define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) | 
| 439 | BIGNUM *bn_expand2(BIGNUM *a, int words); | 441 | BIGNUM *bn_expand2(BIGNUM *a, int words); | 
| 440 | 442 | ||
| 441 | #define bn_fix_top(a) \ | 443 | #define bn_fix_top(a) \ | 
| @@ -483,7 +485,9 @@ BN_ULONG bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int num); | |||
| 483 | #define BN_F_BN_CTX_NEW 106 | 485 | #define BN_F_BN_CTX_NEW 106 | 
| 484 | #define BN_F_BN_DIV 107 | 486 | #define BN_F_BN_DIV 107 | 
| 485 | #define BN_F_BN_EXPAND2 108 | 487 | #define BN_F_BN_EXPAND2 108 | 
| 488 | #define BN_F_BN_MOD_EXP2_MONT 118 | ||
| 486 | #define BN_F_BN_MOD_EXP_MONT 109 | 489 | #define BN_F_BN_MOD_EXP_MONT 109 | 
| 490 | #define BN_F_BN_MOD_EXP_MONT_WORD 117 | ||
| 487 | #define BN_F_BN_MOD_INVERSE 110 | 491 | #define BN_F_BN_MOD_INVERSE 110 | 
| 488 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 | 492 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 | 
| 489 | #define BN_F_BN_MPI2BN 112 | 493 | #define BN_F_BN_MPI2BN 112 | 
