ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 04, 2021, 04:18:14 AM |
|
Yes, I used the program almost like yours is written below. But I compared it with yours and noticed a fundamental mistake. And now everything works. I am very grateful to you for your help. I hope that my way of calculation is correct and I can share my work with here.
pk1 = '031656894A2E404E652E3A2B368C7DF820B0E92FE32529C41931A9F7B234457D5B' pk2 = '022FA21D1CEA4BC1F9911A9D501E3D8B3C97D15AAA76A63FECD0D529B9EF2E22F5' after addition result should be 02ea31f5d48f0c43969b607d592636e2443539e7a86ef1350dba0d9040a98fc378 how come you are looking for 0297539272d59d6e75488df9a5628e7b0efc03b4fec79de246ac116ae40c05225a ?
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1064
Merit: 219
Shooters Shoot...
|
|
August 04, 2021, 04:24:06 AM |
|
Yes, I used the program almost like yours is written below. But I compared it with yours and noticed a fundamental mistake. And now everything works. I am very grateful to you for your help. I hope that my way of calculation is correct and I can share my work with here.
pk1 = '031656894A2E404E652E3A2B368C7DF820B0E92FE32529C41931A9F7B234457D5B' pk2 = '022FA21D1CEA4BC1F9911A9D501E3D8B3C97D15AAA76A63FECD0D529B9EF2E22F5' after addition result should be 02ea31f5d48f0c43969b607d592636e2443539e7a86ef1350dba0d9040a98fc378 how come you are looking for 0297539272d59d6e75488df9a5628e7b0efc03b4fec79de246ac116ae40c05225a ? Pretty sure he used subtraction
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 04, 2021, 04:26:58 AM |
|
Yes, I used the program almost like yours is written below. But I compared it with yours and noticed a fundamental mistake. And now everything works. I am very grateful to you for your help. I hope that my way of calculation is correct and I can share my work with here.
pk1 = '031656894A2E404E652E3A2B368C7DF820B0E92FE32529C41931A9F7B234457D5B' pk2 = '022FA21D1CEA4BC1F9911A9D501E3D8B3C97D15AAA76A63FECD0D529B9EF2E22F5' after addition result should be 02ea31f5d48f0c43969b607d592636e2443539e7a86ef1350dba0d9040a98fc378 how come you are looking for 0297539272d59d6e75488df9a5628e7b0efc03b4fec79de246ac116ae40c05225a ? Pretty sure he used subtraction lol yes indeed => R = P - Q 0297539272d59d6e75488df9a5628e7b0efc03b4fec79de246ac116ae40c05225a
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 04, 2021, 09:16:41 AM |
|
@NotATether
i have 300 public keys and loading one by one in this script is painful. can you please modify this script to get a file of public keys and process one by one all.
You mean like compute the sum of all 300 pubkeys? Or shifting down all the keys in a file by a fixed amount? Either way, it's a straightforward change, but for the division script specifically you need to tell me whether the divisor is the same for all numbers and how you want the output to be made (i.e. all "shifted" keys for each public keys, or just some shifted keys, or some public keys?) from fastecdsa import curve from fastecdsa.point import Point import bit
G = curve.secp256k1.G N = curve.secp256k1.q
pk1 = '031656894a2e404e652e3a2b368c7df820b0e92fe32529c41931a9f7b234457d5b' pk2 '022fa21d1cea4bc1f9911a9d501e3d8b3c97d15aaa76a63fecd0d529b9ef2e22f5'
def pub2point(pub_hex): x = int(pub_hex[2:66], 16) if len(pub_hex) < 70: y = bit.format.x_to_y(x, int(pub_hex[:2], 16) % 2) else: y = int(pub_hex[66:], 16) return Point(x, y, curve=curve.secp256k1)
def add(pk1, pk2, convert=True): if convert: P = pub2point(pk1) Q = pub2point(pk2) else: P = pk1 Q = pk2 R = P + Q return R
def sub(pk1, pk2, convert=True): if convert: P = pub2point(pk1) Q = pub2point(pk2) else: P = pk1 Q = pk2 R = P - Q return R
def point2pub(R): # Remove the following code if you are doing multiple additions successively # as it brings a speed improvement, and just return R if (R.y % 2 == 0): prefix = "02" else: prefix = "03" hx = hex(R.x)[2:].zfill(64) return hx
with open("input.txt") as f: line = f.readline() if line: P = pub2point(line) while line: line = f.readline() Q = pub2point(line) # Replace this with sub() if you want subtraction, as your last # post left me confused about what you want. P = add(P, Q, convert=False)
print(point2pub(P))
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 04, 2021, 10:12:28 AM |
|
@NotATether
i have 300 public keys and loading one by one in this script is painful. can you please modify this script to get a file of public keys and process one by one all.
You mean like compute the sum of all 300 pubkeys? Or shifting down all the keys in a file by a fixed amount? Either way, it's a straightforward change, but for the division script specifically you need to tell me whether the divisor is the same for all numbers and how you want the output to be made (i.e. all "shifted" keys for each public keys, or just some shifted keys, or some public keys?) from fastecdsa import curve from fastecdsa.point import Point import bit
G = curve.secp256k1.G N = curve.secp256k1.q
pk1 = '031656894a2e404e652e3a2b368c7df820b0e92fe32529c41931a9f7b234457d5b' pk2 '022fa21d1cea4bc1f9911a9d501e3d8b3c97d15aaa76a63fecd0d529b9ef2e22f5'
def pub2point(pub_hex): x = int(pub_hex[2:66], 16) if len(pub_hex) < 70: y = bit.format.x_to_y(x, int(pub_hex[:2], 16) % 2) else: y = int(pub_hex[66:], 16) return Point(x, y, curve=curve.secp256k1)
def add(pk1, pk2, convert=True): if convert: P = pub2point(pk1) Q = pub2point(pk2) else: P = pk1 Q = pk2 R = P + Q return R
def sub(pk1, pk2, convert=True): if convert: P = pub2point(pk1) Q = pub2point(pk2) else: P = pk1 Q = pk2 R = P - Q return R
def point2pub(R): # Remove the following code if you are doing multiple additions successively # as it brings a speed improvement, and just return R if (R.y % 2 == 0): prefix = "02" else: prefix = "03" hx = hex(R.x)[2:].zfill(64) return hx
with open("input.txt") as f: line = f.readline() if line: P = pub2point(line) while line: line = f.readline() Q = pub2point(line) # Replace this with sub() if you want subtraction, as your last # post left me confused about what you want. P = add(P, Q, convert=False)
print(point2pub(P)) shifting down all the keys in a file by a fixed amount <=== this one i want to achieve ~ instead of loading one key here for divisor 32 pubkey = '03a2efa402fd5268400c77c20e574ba86409ededee7c4020e4b9f0edbee53de0d4' i want to load 300 keys from file line by line and do the divisor calculation on each one 32 time and save output in file.
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 04, 2021, 11:34:24 AM |
|
i want to load 300 keys from file line by line and do the divisor calculation on each one 32 time and save output in file.
Again, one file total, or one file for each pubkey? Printing all the keys in a single file becomes messy to read but is doable.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 04, 2021, 12:51:56 PM |
|
i want to load 300 keys from file line by line and do the divisor calculation on each one 32 time and save output in file.
Again, one file total, or one file for each pubkey? Printing all the keys in a single file becomes messy to read but is doable. 1 file total is fine & if it is easy to script both that would be perfect :p
|
|
|
|
yoyodapro
Jr. Member
Offline
Activity: 50
Merit: 7
|
|
August 04, 2021, 02:24:03 PM |
|
Kangaroo pool up and running if anyone wants to join! the pool is currently at 2^27/2^35.55 DP in only 4 days! we will be finding this address soon as more people join. The prize will be split according to the number of kangaroos you supply to the pool as well as your speed. We only want QUALITY kangaroos, which means if you change your gpu grid to supply more kangaroos but decrease your speed to do so these are not quality kangaroos and you be paid on your speed to the pool. https://github.com/yoyodapro/Kangaroo-ServerThe pool is currently at 2^28.081/2^35.55 DP, thank you to all that are joining us! As has been discussed in our discord, if you are afraid of losing the work youve already put into your own kangaroo search, we are allowing users to contribute their own work files (DP 25 and above) towards their share of the prize.
|
Bitcoin Puzzle Transactions Discord
https://discord.gg/WQSB6cwkQE
₿̶̛̛͖̺̝̳͓͈̰̹̱̝̪͙̹̦̹̯̬͙̠͂̌̉͐͊̎̓͋̓͗̑̏͒̉̈́̇̐̇̔̅̾͗̐̆̐͛͂̿̿̏̎̔̌̚̕͜͝͝͠͝͝
|
|
|
studyroom1
Jr. Member
Offline
Activity: 40
Merit: 7
|
|
August 04, 2021, 02:42:12 PM |
|
i want to load 300 keys from file line by line and do the divisor calculation on each one 32 time and save output in file.
Again, one file total, or one file for each pubkey? Printing all the keys in a single file becomes messy to read but is doable. yes please if you can share such script
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 04, 2021, 11:30:08 PM Last edit: August 05, 2021, 04:41:33 PM by NotATether |
|
In that case this should do the trick: EDIT NUMBER 3: THIS VERSION ACTUALLY WORKS USE THIS ONE from fastecdsa import curve from fastecdsa.point import Point import bit
G = curve.secp256k1.G N = curve.secp256k1.q
def pub2point(pub_hex): x = int(pub_hex[2:66], 16) if len(pub_hex) < 70: y = bit.format.x_to_y(x, int(pub_hex[:2], 16) % 2) else: y = int(pub_hex[66:], 16) return Point(x, y, curve=curve.secp256k1)
# This function makes all the downscaled pubkeys obtained from subtracting # numbers between 0 and divisor, before dividing the pubkeys by divisor. def shiftdown(pubkey, divisor, file, convert=True): Q = pub2point(pubkey) if convert else pubkey print(Q, 'QQ') # k = 1/divisor k = pow(divisor, N - 2, N) for i in range(divisor+1): P = Q - (i * G) P = k * P if (P.y % 2 == 0): prefix = "02" else: prefix = "03" hx = hex(P.x)[2:].zfill(64) hy = hex(P.y)[2:].zfill(64) file.write(prefix+hx+"\n") # Writes compressed key to file
factor = 32
with open("input.txt", "r") as f, open("output.txt", "w") as outf: line = f.readline().strip() while line != '': shiftdown(line, factor, outf) line = f.readline().strip()
This is for all keys in one file, I technically *could* script the case of one set of shifted keys per file, but then it requires an argc/argv switch to toggle the one you want and implementing that will bloat the code size EDIT: I had posted an older version of the script which people complained had a bunch of errors, admittingly I did not test this version with the file input since the base script was already "bug free" I thought these should be straightforward changes... well now I know After some proper testing, I got rid of a bunch of artifacts from older script versions that were triggering lint errors, and the result is posted here, above.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 05, 2021, 03:21:28 AM |
|
In that case this should do the trick: from fastecdsa import curve from fastecdsa.point import Point import bit
G = curve.secp256k1.G N = curve.secp256k1.q
def pub2point(pub_hex): x = int(pub_hex[2:66], 16) if len(pub_hex) < 70: y = bit.format.x_to_y(x, int(pub_hex[:2], 16) % 2) else: y = int(pub_hex[66:], 16) return Point(x, y, curve=curve.secp256k1)
# This function makes all the downscaled pubkeys obtained from subtracting # numbers between 0 and divisor, before dividing the pubkeys by divisor. def shiftdown(pubkey, divisor, file, convert=True): if convert: Q = pub2point(pubkey) else: Q = pubkey # k = 1/divisor k = pow(divisor, N - 2, N) for i in range(divisor+1): P = Q - (i * G) P = k * P if (P.y % 2 == 0): prefix = "02" else: prefix = "03" hx = hex(P.x)[2:].zfill(64) hy = hex(P.y)[2:].zfill(64) file.write(prefix+hx+"\n") # Writes compressed key to file
factor = 32
with open("input.txt") as f, open("output.txt", "a") as outf: line = f.readline() if line: P = pub2point(line) while line: line = f.readline() Q = pub2point(line) P = shiftdown(P, factor, outf, convert=False)
This is for all keys in one file, I technically *could* script the case of one set of shifted keys per file, but then it requires an argc/argv switch to toggle the one you want and implementing that will bloat the code size cool bro but one issue is appearing Traceback (most recent call last): File "shiftdown.py", line 47, in <module> P = shiftdown(P, factor, outf, convert=False) File "shiftdown.py", line 28, in shiftdown P = Q - (i * G) TypeError: unsupported operand type(s) for -: 'NoneType' and 'Point'
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 05, 2021, 12:52:08 PM |
|
cool bro but one issue is appearing Traceback (most recent call last): File "shiftdown.py", line 47, in <module> P = shiftdown(P, factor, outf, convert=False) File "shiftdown.py", line 28, in shiftdown P = Q - (i * G) TypeError: unsupported operand type(s) for -: 'NoneType' and 'Point' There was a small typo, try it now.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
studyroom1
Jr. Member
Offline
Activity: 40
Merit: 7
|
|
August 05, 2021, 03:06:53 PM |
|
cool bro but one issue is appearing Traceback (most recent call last): File "shiftdown.py", line 47, in <module> P = shiftdown(P, factor, outf, convert=False) File "shiftdown.py", line 28, in shiftdown P = Q - (i * G) TypeError: unsupported operand type(s) for -: 'NoneType' and 'Point' There was a small typo, try it now. i don't know for others but for me still issue as no error is there and nothing in output.txt. also it is deleting data from input file . after executing codes both file became 0 in size. is it working on your side?
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 05, 2021, 04:40:54 PM Last edit: August 06, 2021, 02:46:32 AM by NotATether |
|
i don't know for others but for me still issue as no error is there and nothing in output.txt. also it is deleting data from input file . after executing codes both file became 0 in size. I'm not doubting you but I couldn't reproduce the deleting data from input file part. is it working on your side?
See the update a few posts above
I'm thinking of making a (CPU-only) ARM port of Kangaroo, because renting those kinds of machines on cloud systems is slightly cheaper than x86 machines. Edit: apparently ARM doesn't have a 64x64->128 bit mul instruction, but it does have a host of 128-bit registers, so some creative assembly to implement high-level operations like ECmul (e.g. https://eprint.iacr.org/2014/760.pdf) is necessary. ARM needs 5 instructions to emulate 64x64=128 bit mul compared to just 1 on x86.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
dextronomous
|
|
August 05, 2021, 11:49:33 PM |
|
wow it created an output file with 99 nums.. what range should those be at sir.
|
|
|
|
NotATether
Legendary
Offline
Activity: 1610
Merit: 6752
bitcoincleanup.com / bitmixlist.org
|
|
August 06, 2021, 01:10:14 AM |
|
wow it created an output file with 99 nums.. what range should those be at sir.
That's how it works. At the bottom of the script there's a variable called "factor" you should change that determines how much each key is divided by (yes all keys are shifted by the same factor). I also include the "0" position as well as the 1-32 positions, that's why you see 33 shifted keys per key. You must have used 3 keys as file input. If you wanted to shift down each pubkey by 5 bits for example, compute 2**5 and then set "factor" to that value. Your range will be between 0 and 2 bitsorig_range - bitsfactor e.g. if your range is 120 and you shrink it by 5, the max is 2^115 in hex.
|
. .BLACKJACK ♠ FUN. | | | ███▄██████ ██████████████▀ ████████████ █████████████████ ████████████████▄▄ ░█████████████▀░▀▀ ██████████████████ ░██████████████ █████████████████▄ ░██████████████▀ ████████████ ███████████████░██ ██████████ | | CRYPTO CASINO & SPORTS BETTING | | │ | | │ | ▄▄███████▄▄ ▄███████████████▄ ███████████████████ █████████████████████ ███████████████████████ █████████████████████████ █████████████████████████ █████████████████████████ ███████████████████████ █████████████████████ ███████████████████ ▀███████████████▀ ███████████████████ | | .
|
|
|
|
rage0920
Newbie
Offline
Activity: 5
Merit: 0
|
|
August 06, 2021, 02:01:50 PM |
|
i am using kangaroo on tesla v100 X8 its currently running at 7255.03 MK/s and its stuck in 2^50 the point values are increasing extremely slow and it shows that the expected operations is 2^60.73 so does that mean that the private key will be found when the count reaches 2^60.73..?? why is it slow do i have to increase the kangaroo number..?? if so how to do that
|
|
|
|
studyroom1
Jr. Member
Offline
Activity: 40
Merit: 7
|
|
August 06, 2021, 03:25:06 PM |
|
wow it created an output file with 99 nums.. what range should those be at sir.
That's how it works. At the bottom of the script there's a variable called "factor" you should change that determines how much each key is divided by (yes all keys are shifted by the same factor). I also include the "0" position as well as the 1-32 positions, that's why you see 33 shifted keys per key. You must have used 3 keys as file input. If you wanted to shift down each pubkey by 5 bits for example, compute 2**5 and then set "factor" to that value. Your range will be between 0 and 2 bitsorig_range - bitsfactor e.g. if your range is 120 and you shrink it by 5, the max is 2^115 in hex. thanks man , its worked
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 08, 2021, 07:01:24 AM |
|
wow it created an output file with 99 nums.. what range should those be at sir.
That's how it works. At the bottom of the script there's a variable called "factor" you should change that determines how much each key is divided by (yes all keys are shifted by the same factor). I also include the "0" position as well as the 1-32 positions, that's why you see 33 shifted keys per key. You must have used 3 keys as file input. If you wanted to shift down each pubkey by 5 bits for example, compute 2**5 and then set "factor" to that value. Your range will be between 0 and 2 bitsorig_range - bitsfactor e.g. if your range is 120 and you shrink it by 5, the max is 2^115 in hex. Thanks , codes now working !~
|
|
|
|
ssxb
Jr. Member
Offline
Activity: 81
Merit: 2
|
|
August 08, 2021, 11:07:02 AM |
|
how to calculate hex key range , i mean 120 range is - Min range: 800000000000000000000000000000
- Max range: 1000000000000000000000000000000
so total search space is 7fffffffffffffffffffffffffffff . i guess how can i calculate total range space between 2 key ranges?
|
|
|
|
|