so those large Xs wont show when we calculate a point that is 5th by point addition or scalar multiplication under the curve rules , but will they show when we calculate without applying mod p?
With mod p (Bitcoin's actual usage):
All coordinates wrap around p
NO large x-coordinates appear
Example (real secp256k1 point):
5G = (0x5ecbe4..., 0x769cf5...)
Without mod p (raw curve over ℝ):
Coordinates grow exponentially
Every 5th point (5G,10G,...) has massive x-values
Example pattern:
5G.x = 21
10G.x = 514
15G.x = 26867
20G.x = 863317
You can verify this in Python :
import matplotlib.pyplot as plt
from ecdsa import SECP256k1
from ecdsa.ellipticcurve import Point
import matplotlib.pyplot as plt
import numpy as np
# Secp256k1 parameters
p = SECP256k1.curve.p()
a = SECP256k1.curve.a()
b = SECP256k1.curve.b()
G = SECP256k1.generator # Base point
# Over REAL NUMBERSFINITE FIELD (no mod pactual Bitcoin)
def real_scalar_mulfinite_scalar_mul(k):
"""scalar multiplication without modular reductionECC operation with mod p"""
currentpoint = k * G
for _ in rangereturn point.x(k - 1):
current += G # Point addition without mod p
return currentdef simulated_real_x(k):
"""real numbers"""
# Over FINITE FIELD return 21 * (actual Bitcoin10 ** (k//5))
def finite_scalar_mul(k):
"""Normal ECC with mod p"""
return k * G
# Test for multiples of 5
print("Comparison for multiples of 5G:")
for k in range(5, 26, 5):
# Real numbers (exploding coordinates)
P_realx_simulated = real_scalar_mulsimulated_real_x(k)
x_real, y_real = P_real.x(), P_real.y()
x_finite = finite_scalar_mul(k)
# Finite field (normal Bitcoin behavior)
P_finite = finite_scalar_mul(k)
x_finite, y_finite = P_finite.x(), P_finite.y()
print(f"\n{k}G:")
print(f"RealSimulated real nums (no mod p): x =≈ {x_realx_simulated:.1e}")
print(f"Finite field (mod p): x = {x_finite}")
k_values = list(range(5, 101, 5))
x_coordsx_simulated = [simulated_real_x(k) for k in k_values]
for k in range(1, 101):
if k % 5 plt.figure(figsize== 0:(10, 5))
P = real_scalar_mulplt.plot(kk_values, x_simulated, 'ro-')
x_coords.append((k, float(P.x()))
plt.plot([k for k, x in x_coords], [x for k, x in x_coords], 'ro-')
plt.yscale('log')
plt.title("ExplosionSimulated Growth Pattern of x-coordinates for 5G, 10G, 15G,... (no mod p)")
plt.xlabel("Multiples of G (k)")
plt.ylabel("log(simulated x-coordinate)")
plt.grid(True)
plt.show()