From eeb8cdccde497bc21e4108774e4951dd37d871eb Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Fri, 5 Apr 2013 13:44:53 -0600 Subject: [PATCH] s_fp_sub() bug fix --- ctaocrypt/src/tfm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctaocrypt/src/tfm.c b/ctaocrypt/src/tfm.c index 25372ded9..8f2c93f3e 100644 --- a/ctaocrypt/src/tfm.c +++ b/ctaocrypt/src/tfm.c @@ -169,7 +169,7 @@ void s_fp_sub(fp_int *a, fp_int *b, fp_int *c) for (; x < a->used; x++) { t = ((fp_word)a->dp[x]) - t; c->dp[x] = (fp_digit)t; - t = (t >> DIGIT_BIT); + t = (t >> DIGIT_BIT)&1; } for (; x < oldused; x++) { c->dp[x] = 0;