X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_lcl.h;h=1db940f4c5865bb4de69c26a1437e388007add40;hb=90a617e05054f4b56aebf0b41a6cd465a26ebeca;hp=73792f12206e6c0e2ff3c7d69c8cb0be9e3a076e;hpb=48fe4d6233ac2d60745742a27f820dd88bc6689d;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h index 73792f1220..1db940f4c5 100644 --- a/crypto/bn/bn_lcl.h +++ b/crypto/bn/bn_lcl.h @@ -239,6 +239,16 @@ struct bignum_ctx #define Lw(t) (((BN_ULONG)(t))&BN_MASK2) #define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2) + +#define bn_clear_top2max(a) \ + { \ + int ind = (a)->dmax - (a)->top; \ + BN_ULONG *ftl = &(a)->d[(a)->top-1]; \ + for (; ind != 0; ind--) \ + *(++ftl) = 0x0; \ + } + + /* This is used for internal error checking and is not normally used */ #ifdef BN_DEBUG # include @@ -428,6 +438,8 @@ void bn_mul_low_recursive(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,int n2, BN_ULONG *t); void bn_mul_high(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b,BN_ULONG *l,int n2, BN_ULONG *t); +BN_ULONG bn_add_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, + int cl, int dl); BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, int cl, int dl);