First, we start from secp256k1, where we replace the real base point with (x=0x1;y=0x4218f20ae6c646b363db68605822fb14264ca8d2587fdd6fbc750d587e76a7ee). Then, we calculate "zero side" for the famous equation: y^2=x^3+7. Which means, we move all things to one side, which can give us: x^3-y^2+7=0. The right side is then zero, and the left side is just a huge number, which gives us zero, when we apply modulo p-value. We make sure that our left side is non-negative (so we use x^3-y^2+7 or y^2-x^3-7). Then, this left value is what we can compute for any public key we want. For convenience, we can divide it by p-value, to work with smaller numbers (because all of them are divisible by p-value, if we are working with valid points).
And then, we compare those "zero values" between different public keys, by applying gcd to both of them. If we can get only p-value out of that, we will get just "one" (because of division by p-value), which means this particular pair of points can be present only on this particular curve, or some curve with bigger p-value. However, if our gcd is bigger than one (after dividing by p-value), then it means, we can teleport those points to a different curve, with a different p-value.
So, which values can we get out of that? Well, if we start with our modified generator, we can get 0x1, 0x2, 0x4, 0x11, 0x22, 0x44, 0x10c1, 0x2182, 0x4304, and so on. However, if we use the original generator, we can get only 0x1 or 0x3. Why it is the case?
basePoint=0x1110df3be5e21e6776516a5fa6702d71d937b2614804cce0315f9575458ff784
p=0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
modulo_root=(p+1)/4
x=2
limit=x+0x100
b_value=7
is_on_curve=False
while x x_cube=(x*x*x)%p
y_square=(x_cube+b_value)%p
y=y_square.powermod(modulo_root,p)
is_on_curve=(y.powermod(2,p)==y_square)
if is_on_curve:
y_negative=(p-y)
if y_negative y=y_negative
if is_on_curve:
left_side=y*y
right_side=x*x*x+b_value
zero_side=left_side-right_side
if zero_side<0:
zero_side=right_side-left_side
zero_side=zero_side/p
common=gcd(zero_side,basePoint)
print(hex(x),hex(y),hex(common))
x+=1
So, our "basePoint" for (x=0x1;y=0x4218f20ae6c646b363db68605822fb14264ca8d2587fdd6fbc750d587e76a7ee) is equal to 0x1110df3be5e21e6776516a5fa6702d71d937b2614804cce0315f9575458ff784 (after division by p-value). For the real generator, it is equal to 0x1b888e01a06e974017a28a5b4da436169761c9730b7aeedf75fc60f6a33cfc7792fe74711f025
d590b10e57f1b3a7ce38ffc4c885c515894b45c19c9f413e5e9. But then, after replacing that value, the code will give us only one or three. Do you have any idea, why it is the case?