diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_local.h')
-rw-r--r-- | src/lib/libcrypto/bn/bn_local.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/lib/libcrypto/bn/bn_local.h b/src/lib/libcrypto/bn/bn_local.h index 7bddcb21b9..48d24c5a27 100644 --- a/src/lib/libcrypto/bn/bn_local.h +++ b/src/lib/libcrypto/bn/bn_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_local.h,v 1.2 2022/11/26 17:23:17 tb Exp $ */ | 1 | /* $OpenBSD: bn_local.h,v 1.3 2022/11/30 03:08:39 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -509,21 +509,10 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, | |||
509 | int cl, int dl); | 509 | int cl, int dl); |
510 | int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num); | 510 | int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num); |
511 | 511 | ||
512 | void bn_correct_top(BIGNUM *a); | ||
512 | int bn_expand(BIGNUM *a, int bits); | 513 | int bn_expand(BIGNUM *a, int bits); |
513 | int bn_wexpand(BIGNUM *a, int words); | 514 | int bn_wexpand(BIGNUM *a, int words); |
514 | 515 | ||
515 | #define bn_correct_top(a) \ | ||
516 | { \ | ||
517 | BN_ULONG *ftl; \ | ||
518 | int tmp_top = (a)->top; \ | ||
519 | if (tmp_top > 0) \ | ||
520 | { \ | ||
521 | for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \ | ||
522 | if (*(ftl--)) break; \ | ||
523 | (a)->top = tmp_top; \ | ||
524 | } \ | ||
525 | } | ||
526 | |||
527 | BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); | 516 | BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); |
528 | BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); | 517 | BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); |
529 | void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num); | 518 | void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num); |