diff options
author | Andy Polyakov <appro@openssl.org> | 2015-01-20 15:12:07 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:25:39 +0000 |
commit | 20c554ce8f399d9a1b19d6e0580f6282746bebff (patch) | |
tree | 1d42bba2dae56d02bec6d11590177d4c5c86011e | |
parent | d72781b4c90e7e94b5fa344eab41cb54857e3fbe (diff) |
bn/bn_recp.c: make it indent-friendly.
Reviewed-by: Tim Hudson <tjh@openssl.org>
-rw-r--r-- | crypto/bn/bn_recp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index b5f57e51f2..07bcad65d2 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -167,16 +167,16 @@ int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, /* Nr := round(2^i / N) */ if (i != recp->shift) - recp->shift=BN_reciprocal(&(recp->Nr),&(recp->N), - i,ctx); /* BN_reciprocal returns i, or -1 for an error */ + recp->shift=BN_reciprocal(&(recp->Nr),&(recp->N),i,ctx); + /* BN_reciprocal could have returned -1 for an error */ if (recp->shift == -1) goto err; - /*- - * d := |round(round(m / 2^BN_num_bits(N)) * recp->Nr / 2^(i - BN_num_bits(N)))| - * = |round(round(m / 2^BN_num_bits(N)) * round(2^i / N) / 2^(i - BN_num_bits(N)))| - * <= |(m / 2^BN_num_bits(N)) * (2^i / N) * (2^BN_num_bits(N) / 2^i)| - * = |m/N| - */ + /*- + * d := |round(round(m / 2^BN_num_bits(N)) * recp->Nr / 2^(i - BN_num_bits(N)))| + * = |round(round(m / 2^BN_num_bits(N)) * round(2^i / N) / 2^(i - BN_num_bits(N)))| + * <= |(m / 2^BN_num_bits(N)) * (2^i / N) * (2^BN_num_bits(N) / 2^i)| + * = |m/N| + */ if (!BN_rshift(a,m,recp->num_bits)) goto err; if (!BN_mul(b,a,&(recp->Nr),ctx)) goto err; if (!BN_rshift(d,b,i-recp->num_bits)) goto err; |