aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn/bn_lcl.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/bn_lcl.h')
-rw-r--r--crypto/bn/bn_lcl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h
index 8a4dba3..090a7a0 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 index = (a)->dmax - (a)->top; \
+ BN_ULONG *ftl = &(a)->d[(a)->top-1]; \
+ for (; index != 0; index--) \
+ *(++ftl) = 0x0; \
+ }
+
+
/* This is used for internal error checking and is not normally used */
#ifdef BN_DEBUG
# include <assert.h>