Open y2kbtc opened 3 months ago
hello
can you explain what's with this coprime pair? do we need to search coprime pair? what is the connection between these partial keys and coprime pair?
Thanks
As you can read from creator this can be dangerous, he intentionally put some mistakes in the script itself and i agree with him so i can't give you specific details, i can give you a short explanation the pairs on the twist curves must be coprime in order to reconstruct the prv key, why ? Coprime Numbers: Two numbers are considered coprime (relatively prime) if they share no common divisors other than 1.
Why Coprime Matters (sometimes): When adding points on elliptic curves, the order of the resulting point is related to the orders of the points you added. In some specific scenarios, particularly when dealing with twists and point multiplication, it can be crucial that the orders of the points you're adding are coprime. This ensures a well-defined result and avoids certain complications.
Hi.
Thanks for your explanation.
Is it necessary to consider sextic twist isomorphism when transferring curves (secp256k1 --> twisted curves)? or can it be replaced by the concept of coprime?
Is it necessary to consider sextic twist isomorphism when transferring curves (secp256k1 --> twisted curves)? or can it be replaced by the concept of coprime?
Hi Grothwen, no it is not necessary unless you want to have some kind of endomorphism linking back to the original public key. which would make this program moot. co prime is better. im updating the code in the next couple of days to make it more clearer for everyone who is using it. give me a few days.
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration.
anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello
why you talk what curve with k=4 no coprime ?
Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello
why you talk what curve with k=4 no coprime ?
Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello why you talk what curve with k=4 no coprime ? Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
you need to verify not only y coordinate of point on twist, but point belong to twist curve or not - vryfy y and X, not only Y, yes ?
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello why you talk what curve with k=4 no coprime ? Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
Bro, coprime is about curve, not depend from publick key, but, some point has point on a twist, some not.Combintion of twistS points different for different pubkeys, I Think(not verify yet, my phone to slow for normal tests).
this is a twists from -7 to 7,they all coprime and non 0 discriminant:
Twist Curve 6: Weierstrass equation: y^2 = x^3 + 0 * x + 6 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834656111 Small Subgroups: [(2, 2), (7, 2), (10903, 1), (5290657, 1), (10833080827, 1), (22921299619447,
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello why you talk what curve with k=4 no coprime ? Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
Bro, coprime is about curve, not depend from publick key, but, some point has point on a twist, some not.Combintion of twistS points different for different pubkeys, I Think(not verify yet, my phone to slow for normal tests).
yes i do know that the co primeness is about the numbers, not the public key. maybe i had not been clear in my explanation.
In order for this attack to work, you need co primeness, y coordinates being valid on the twisted curve and zero discriminant. if the orders are not co prime it wont work.
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello why you talk what curve with k=4 no coprime ? Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
Bro, coprime is about curve, not depend from publick key, but, some point has point on a twist, some not.Combintion of twistS points different for different pubkeys, I Think(not verify yet, my phone to slow for normal tests).
yes i do know that the co primeness is about the numbers, not the public key. maybe i had not been clear in my explanation.
In order for this attack to work, you need co primeness, y coordinates being valid on the twisted curve and zero discriminant. if the orders are not co prime it wont work.
I was try but no success, I was send you pm at bitcointalk(cobras)...
Bro, can you provide one example with success finding key ?
Hello, I completely agree, please give us an example, in which the key is found successfully. Many thanks.
Code for transform point from one curve o another wirh different k, but I dont understand how to transfer to different order:
from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.schemes.elliptic_curves.constructor import EllipticCurve
p1 = 3319
p2 = 3319 Fp1 = FiniteField(p1)
Fp2 = FiniteField(p2)
b1 = -5 b2 = 7
curve1 = EllipticCurve(Fp1, [0, b1]) curve2 = EllipticCurve(Fp2, [0, b2])
x = Fp1(595) y = Fp1(1323)
equivalent_point_found = False for y_prime in Fp2: if y_prime2 == x3 + b2*x + b2: print(f"Equivalent point on curve2: ({x}, {y_prime})") equivalent_point_found = True break
if not equivalent_point_found: print("No equivalent point found on curve2.")
`
from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.schemes.elliptic_curves.constructor import EllipticCurve
p1 = 3319
p2 = 3319 Fp1 = FiniteField(p1)
Fp2 = FiniteField(p2)
b1 = -5 b2 = 7
curve1 = EllipticCurve(Fp1, [0, b1]) curve2 = EllipticCurve(Fp2, [0, b2])
x = Fp1(595) y = Fp1(1323)
equivalent_point_found = False for y_prime in Fp2: if y_prime2 == x3 + b2*x + b2: print(f"Equivalent point on curve2: ({x}, {y_prime})") equivalent_point_found = True break
if not equivalent_point_found: print("No equivalent point found on curve2.")
`
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
I was try but unsuccessful. Krash not answered me to my pm. I dont know what to do. If you cant run original Krash twist scrypt need, replace "ElliptCurve" to "EllipticCurve"
I have no idea how to recover privkey, very unfortunately.
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
And now i formation what is a new points what Krash scrypt make , "twist" what twist, is it a twist or not, with another base points I cant find partial privkey, how this is possible...
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
And now i formation what is a new points what Krash scrypt make , "twist" what twist, is it a twist or not, with another base points I cant find partial privkey, how this is possible...
Work on fine tunning in twist curves start with own prv/pub key to get the ideea even one twist is enough if it is a match on a partial prv key ... From there is a trial/error thing.... If you find the perfect match on subgroup on twist ( you can modify the threshold value) on the script to give more data, some pub keys won't work also as a hint my p = which define the curve I have it different....
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
And now i formation what is a new points what Krash scrypt make , "twist" what twist, is it a twist or not, with another base points I cant find partial privkey, how this is possible...
Work on fine tunning in twist curves start with own prv/pub key to get the ideea even one twist is enough if it is a match on a partial prv key ... From there is a trial/error thing.... If you find the perfect match on subgroup on twist ( you can modify the threshold value) on the script to give more data, some pub keys won't work also as a hint my p = which define the curve I have it different....
did you find at least one correct partial private key on any curve and any order? and please exclude pure luck from your answer. Honestly, I doubt it. Partial key is guessed by bruteforcing the value of E.gens()[0] which can be any point that being multiplied by the curve order gives (0x0,0x0). You can check that E.gens()[] for secp256k1 curve doesnt even match the real G for bitcoin curve in sage. The only way a private key is found is in this case: hg = h E.gens()[0] hQ = hg private_key or in case you guess by luck a generator point for each curve that multiplied by the real partial private key gives the value of the twisted point. But anyway, happy hunting!
You did a nice job, but would you be so kind to show us some working example of this script? not for the entire private key but one that finds correctly the partial private key from another curve(twist, isomorphic, quadratic twist or whatever you want), meaning: partial_private_key == real_private_key % subgroup_order (otherwise crt wont work) thanks!
And now i formation what is a new points what Krash scrypt make , "twist" what twist, is it a twist or not, with another base points I cant find partial privkey, how this is possible...
Work on fine tunning in twist curves start with own prv/pub key to get the ideea even one twist is enough if it is a match on a partial prv key ... From there is a trial/error thing.... If you find the perfect match on subgroup on twist ( you can modify the threshold value) on the script to give more data, some pub keys won't work also as a hint my p = which define the curve I have it different....
did you find at least one correct partial private key on any curve and any order? and please exclude pure luck from your answer. Honestly, I doubt it. Partial key is guessed by bruteforcing the value of E.gens()[0] which can be any point that being multiplied by the curve order gives (0x0,0x0). You can check that E.gens()[] for secp256k1 curve doesnt even match the real G for bitcoin curve in sage. The only way a private key is found is in this case: hg = h E.gens()[0] hQ = hg private_key or in case you guess by luck a generator point for each curve that multiplied by the real partial private key gives the value of the twisted point. But anyway, happy hunting!
Yes base points for the twist is a hg = h * E.gens()[0] E is a twist curve.
krashfire .sage scrypt partial pk, ( pk, order):
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration. anyway I appreciate your work
import random def is_prime(num): """ This function checks if a number is prime using a simple trial division. """ if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 == 0: return False i = 5 while i * i <= num: if num % i == 0 or num % (i + 2) == 0: return False i += 6 return True def generate_coprime_numbers(num1, num2): """ This function checks if two provided numbers are coprime. """ if is_prime(num1) and is_prime(num2) and num1 != num2: return num1, num2 else: print(f"Numbers {num1} and {num2} are not coprime.") return None # Indicate no coprime numbers found # Example usage with specific numbers num1 = xxxxxxx # Replace with your desired number num2 = xxxxxx # Replace with your desired number coprime_pair = generate_coprime_numbers(num1, num2) if coprime_pair: print(f"Coprime numbers: {coprime_pair[0]} and {coprime_pair[1]}") print(f"Coprime numbers: {num1} and {num2}")
Hello why you talk what curve with k=4 no coprime ? Twist Curve 4: Weierstrass equation: y^2 = x^3 + 0 * x + 4 Discriminant: 115792089237316195423570985008687907853269984665640564039457584007908834664751 Small Subgroups: [(3, 1), (199, 1), (18979, 1)]
here is the thing, it actually depends on the public key you input. certain public key dont work on certain twisted curves. so you guys need to adjust and see whether certain curves has co primes, are zero discriminant and has a valid y public key. if this 3 bases are a go, then your twisted curve are valid and hence your partial private keys will be valid. so find your own twisted curve specific to your public key coordinates. usually, -7 works. 17 works too. i had gone so low as -30 to get a subgroup and as high as 30.
Bro, coprime is about curve, not depend from publick key, but, some point has point on a twist, some not.Combintion of twistS points different for different pubkeys, I Think(not verify yet, my phone to slow for normal tests).
yes i do know that the co primeness is about the numbers, not the public key. maybe i had not been clear in my explanation.
In order for this attack to work, you need co primeness, y coordinates being valid on the twisted curve and zero discriminant. if the orders are not co prime it wont work.
Krash, when will the update available?
Hello everyone, Waiting for an update from Krash, if you have done any update or if you have a working script, or if you want to share something about this topic. I invite you to a discussion on this private Telegram channel: https://t.me/+gJ9NGjNs8iRjZTU0 Thanks.
Unfortunately the results of the script have nothing in common secp256k1 curve.
hello, any update ?
Okay example we found coprime numbers for order and partial key and after that how we can back to original private key?
I tried with small curve but I cannot back to the original private key (in example private key is 12) Here the file ( https://pastebin.com/8NeqG9Mb ).
Try take china reminder, chatGPT or other provide for you solutions code
You need many privkeys for same twist curves but with different curve order.Try use factors is secp256k1 , n -1 or n-2(I dont remember exact -1 or -2). And find provkeys for all factor include n = around 2*64 and after need provide finded provkeys to CRT
Try take china reminder, chatGPT or other provide for you solutions code
You need many privkeys for same twist curves but with different curve order.Try use factors is secp256k1 , n -1 or n-2(I dont remember exact -1 or -2). And find provkeys for all factor include n = around 2*64 and after need provide finded provkeys to CRT
Ok I perfectly know CRT but I don't get same private key how can I combine it to get valid private key.
Try take china reminder, chatGPT or other provide for you solutions code
You need many privkeys for same twist curves but with different curve order.Try use factors is secp256k1 , n -1 or n-2(I dont remember exact -1 or -2). And find provkeys for all factor include n = around 2*64 and after need provide finded provkeys to CRT
How I must combine it in right way?
First take factors of secp56k1 N - 1, yiu can find in guthub twist attack on secp56k1 and find right factors
secon curve -7 is not isomorph to 7, take another k, I try 6, with yiur cide it is work
therd ask openGPT recover original private mey with chaina reminder theirem, provide chatGPT you cide and he is insert CRT function to your code
?
Then you multiply your subrop orders resukt mast be bigger the N of secp266k1
This more information
Ok thank you for informations but I know these informations for a very long time.
This more information https://github.com/Hurd8x/blog/blob/master/2020_05_26_secp256k1_twist_attacks/secp256k1_twist_attacks.md
Ok thank you for informations but I know these informations for a very long time.
ok
not help you this info ? What not work ?
first of all very very nice script but i cannot acknowledge that is working especially on twist curve 4 is not producing the coprime pair maybe you can implement a mechanism to verify is the numbers are coprime -this is a small AI generated script for inspiration.
anyway I appreciate your work