summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_nist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_nist.c')
-rw-r--r--src/lib/libcrypto/bn/bn_nist.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_nist.c b/src/lib/libcrypto/bn/bn_nist.c
index 4d4a7b86df..d793644e27 100644
--- a/src/lib/libcrypto/bn/bn_nist.c
+++ b/src/lib/libcrypto/bn/bn_nist.c
@@ -321,7 +321,7 @@ static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
321#define bn_32_set_0(to, n) (((n)&1)?(to[(n)/2]&=BN_MASK2l):(to[(n)/2]=0)); 321#define bn_32_set_0(to, n) (((n)&1)?(to[(n)/2]&=BN_MASK2l):(to[(n)/2]=0));
322#define bn_cp_32(to,n,from,m) ((m)>=0)?bn_cp_32_naked(to,n,from,m):bn_32_set_0(to,n) 322#define bn_cp_32(to,n,from,m) ((m)>=0)?bn_cp_32_naked(to,n,from,m):bn_32_set_0(to,n)
323# if _BYTE_ORDER == _LITTLE_ENDIAN 323# if _BYTE_ORDER == _LITTLE_ENDIAN
324# if defined(__arch64__) 324# if defined(_LP64)
325# define NIST_INT64 long 325# define NIST_INT64 long
326# else 326# else
327# define NIST_INT64 long long 327# define NIST_INT64 long long
@@ -340,9 +340,7 @@ static void nist_cp_bn(BN_ULONG *dst, const BN_ULONG *src, int top)
340 } 340 }
341#define bn_cp_32(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0; 341#define bn_cp_32(to, n, from, m) (to)[n] = (m>=0)?((from)[m]):0;
342#define bn_32_set_0(to, n) (to)[n] = (BN_ULONG)0; 342#define bn_32_set_0(to, n) (to)[n] = (BN_ULONG)0;
343# if defined(_WIN32) && !defined(__GNUC__) 343# if defined(BN_LLONG)
344# define NIST_INT64 __int64
345# elif defined(BN_LLONG)
346# define NIST_INT64 long long 344# define NIST_INT64 long long
347# endif 345# endif
348#endif /* BN_BITS2 != 64 */ 346#endif /* BN_BITS2 != 64 */
@@ -594,7 +592,7 @@ int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,
594 } 592 }
595 else if (carry < 0) 593 else if (carry < 0)
596 { 594 {
597 /* it's a bit more comlicated logic in this case. 595 /* it's a bit more complicated logic in this case.
598 * if bn_add_words yields no carry, then result 596 * if bn_add_words yields no carry, then result
599 * has to be adjusted by unconditionally *adding* 597 * has to be adjusted by unconditionally *adding*
600 * the modulus. but if it does, then result has 598 * the modulus. but if it does, then result has