Just getting into this stuff, so bear with me. I made a smaller secp256k1 with p=43, n=31. Took point G(2, 31) as the generator and got all valid points. I printed them out and stuck the paper on my wall. When working from home, I often glance at it looking for something interesting.
That's cool! So every Y has 3 corresponding X values, right? And if you check G for those points, you get a lot of connections. Pretty neat how this can apply to the usual secp256k1 that Bitcoin uses.
Yeah, exactly! Using the cube root of unity, each Y indeed has 3 X values (those are endomorphism points), and each X has 2 Y values (symmetry points). It's all interlinked and used in various tools for faster scanning, like VanitySearch.
Honestly, I just messed around with some prime numbers and values. I ended up finding that if you add all X values of the points and take mod p, it goes to 0.
Exactly! I used G=(1, 69) and found that if I added the valid points, it cycles back to 0 when you mod it. Kinda funky, right? Maybe there's something useful here.
What’s the smallest example you’ve tried? I’ve been playing around with a curve p=7, n=13, and it’s wild how it rotates, plus that 13th point at infinity.
Smallest I've got is with p=7 and G=(1, 1). Just brute-forced some X values to get valid points. Then I saw that if (n-1) mod 6 = 0, it mirrors the bigger secp256k1.
I used a site that lets you input random p-prime numbers and find valid points. If you follow the rule for (n-1) mod 6, you get those sets of Y values.
Sure, here’s a snippet:
from ecdsa.ellipticcurve import Point
from ecdsa.curves import SECP256k1
# Secp256k1 parameters
curve = SECP256k1.curve
p = curve.p()
n = SECP256k1.order
G = SECP256k1.generator
# Endomorphism constants
beta =...
lmbda =...
# Function to apply endomorphism
Let me know if you want the full code!
idk if scaling down secp256k1 this way really reflects how it works at full scale tho... smaller primes might miss some edge cases or weird behaviors. still cool to experiment but gotta be careful with what conclusions you draw