diff --git a/src/modinv64_impl.h b/src/modinv64_impl.h index d6bbb1cb94..2abdaebcb1 100644 --- a/src/modinv64_impl.h +++ b/src/modinv64_impl.h @@ -623,9 +623,6 @@ static unsigned int _secp256k1_scalar_msb_signed(const secp256k1_scalar *x, unsi return secp256k1_scalar_msb_hint(x, hint); } -#define PRINT_SCALAR_IF(condition, pre, scalar) \ - if (condition) { printf(pre);secp256k1_scalar_print(scalar);printf("\n"); } - /* * Original algorithm borrowed from this paper: * https://www.researchgate.net/publication/304417579_Modular_Inverse_Algorithms_Without_Multiplications_for_Cryptographic_Applications (LS3) @@ -664,11 +661,6 @@ static void secp256k1_modinv64_scalar(secp256k1_scalar *ret, const secp256k1_sca VERIFY_CHECK(secp256k1_scalar_eq(&six, &twelve)); #endif -#define LIMIT 0 - - PRINT_SCALAR_IF(LIMIT, "a=", a); - PRINT_SCALAR_IF(LIMIT, "m=", m); - /* if (a < m) { u = m; v = a; r = 0; s = 1; } */ /* else { v = m; u = a; s = 0; r = 1; } */ if (secp256k1_scalar_cmp(a, m) < 0) { *u = *m; *v = *a; *r = zero; *s = one; } diff --git a/src/scalar.h b/src/scalar.h index 251fbcb817..d6b2daf9e6 100644 --- a/src/scalar.h +++ b/src/scalar.h @@ -136,6 +136,4 @@ static void secp256k1_scalar_mul_shift_var(secp256k1_scalar *r, const secp256k1_ /** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. Both *r and *a must be initialized.*/ static void secp256k1_scalar_cmov(secp256k1_scalar *r, const secp256k1_scalar *a, int flag); -static void secp256k1_scalar_print(const secp256k1_scalar *a); - #endif /* SECP256K1_SCALAR_H */ diff --git a/src/scalar_4x64_impl.h b/src/scalar_4x64_impl.h index f29dccc5d0..093f33770b 100644 --- a/src/scalar_4x64_impl.h +++ b/src/scalar_4x64_impl.h @@ -1016,8 +1016,4 @@ SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) return !(a->d[0] & 1); } -static void secp256k1_scalar_print(const secp256k1_scalar *a) { - printf("%016llx%016llx%016llx%016llx", a->d[3], a->d[2], a->d[1], a->d[0]); -} - #endif /* SECP256K1_SCALAR_REPR_IMPL_H */ diff --git a/src/scalar_8x32_impl.h b/src/scalar_8x32_impl.h index 2d4ae9c3d5..ca12d67d6b 100644 --- a/src/scalar_8x32_impl.h +++ b/src/scalar_8x32_impl.h @@ -890,8 +890,4 @@ SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) return !(a->d[0] & 1); } -static void secp256k1_scalar_print(const secp256k1_scalar *a) { - printf("%08llx%08llx%08llx%08llx%08llx%08llx%08llx%08llx", a->d[7], a->d[6], a->d[5], a->d[4], a->d[3], a->d[2], a->d[1], a->d[0]); -} - #endif /* SECP256K1_SCALAR_REPR_IMPL_H */ diff --git a/src/scalar_low_impl.h b/src/scalar_low_impl.h index 66dde72d74..3b2506e8bf 100644 --- a/src/scalar_low_impl.h +++ b/src/scalar_low_impl.h @@ -202,8 +202,4 @@ static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_sc secp256k1_scalar_inverse(r, x); } -static void secp256k1_scalar_print(const secp256k1_scalar *a) { - printf("%08x", *a); -} - #endif /* SECP256K1_SCALAR_REPR_IMPL_H */