Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 12/04/2025, 17:34:17 UTC
?


Code:
from ecdsa import SECP256k1
import matplotlib.pyplot as plt

# Secp256k1 parameters
p = SECP256k1.curve.p()
G = SECP256k1.generator

def finite_mul(k):
    """ECC with mod p"""
    return (k * G).x()

def real_mul_simulation(k):
    """real number growth"""
    base = 21505829891763648114329055987619236494102133314575206970830385799158076338148
    return int(base * (2.5 ** (k//5 - 1)))

print("Comparison for multiples of 5G:")
for k in range(5, 26, 5):
    print(f"\n{k}G:")
    print(f"Simulated real nums (no mod p): x ≈ {real_mul_simulation(k)}")
    print(f"Finite field (mod p): x = {finite_mul(k)}")

k_values = list(range(5, 101, 5))
plt.figure(figsize=(10,5))
plt.plot(k_values, [real_mul_simulation(k) for k in k_values], 'ro-')
plt.yscale('log')
plt.title("Simulated Exponential Growth of x-coordinates (No Mod p)")
plt.xlabel("Multiples of G (k)")
plt.ylabel("log(x-coordinate)")
plt.grid(True)
plt.show()