Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
VinIVaderr
on 22/12/2024, 01:19:04 UTC
Each bag of popcorn has about 700 kernels (GPU Threads.)

We divide the total key space by the number of kernels per bag.
1.48 x 10^20 / 700

That's 211 quadrillion bags.

Chomping at every comment will weigh you down.

Here is a visual example of public key distribution for 65536 keys. Read or ask about the value of Mod P in public key generation.
Good Luck!

Code:
import numpy as np
import matplotlib.pyplot as plt

# Parameters for secp256k1
p = 2**256 - 2**32 - 977

# Function to check if a point is on the secp256k1 curve
def find_y_for_x(x, p):
    rhs = (x**3 + 7) % p
    # Check if there exists a y such that y^2 = rhs (mod p)
    if pow(rhs, (p - 1) // 2, p) == 1:  # Checks if rhs is a quadratic residue
        y = pow(rhs, (p + 1) // 4, p)  # Compute y as sqrt(rhs) mod p
        return y
    return None

# Sample x values in range 65536 and collect valid (x, y) pairs
x_vals = []
y_vals = []

for i in range(65536):
    x = (i * 1) % p
    y = find_y_for_x(x, p)
    if y is not None:
        x_vals.append(x)
        y_vals.append(y)

# Convert values to float for logarithmic scaling
x_vals_scaled = np.log(np.array(x_vals, dtype=np.float64) + 1)  # Log scale for visualization
y_vals_scaled = np.log(np.array(y_vals, dtype=np.float64) + 1)

# Plotting
plt.figure(figsize=(60, 58)) #10,8
plt.scatter(x_vals_scaled, y_vals_scaled, color='blue', s=1)
plt.title("Scatter Plot of secp256k1 Curve Points (Log-Scaled)")
plt.xlabel("log(x)")
plt.ylabel("log(y)")
plt.grid(True)
plt.show()