WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 28, 2023, 10:16:58 PM |
|
The script works like this:
You have a database like this
1010100010110101000101101010001010101000101101000101101010101010001011010100010 1101010001010101000101101010001011011010100010000
target is = 1101010001011010100010101010001
The target is in:
1010100010110101000101101010001010101000101101000101101010101010001011010100010 1101010001010101000101101010001011011010100010000
If we separate in bits:
10101000 1011010 10001011 01010001 01010100 01011010 00101101 01010101 00010110 10100010 11010100 01010101 00010110 10100010 11011010 10001000
No coincidences were found.
Lol, say what? I was asking this: If I want to generate 2^27 keys, but I am limited on RAM, how can I write say 2^20 keys to file, then the next 2^20 keys to file, until all 2^27 keys have been written to file? Using the suggestion or your own, like NotATether was suggesting... i = (i + 1) % 8 Make sense?
|
|
|
|
mcdouglasx (OP)
Member
Offline
Activity: 240
Merit: 53
New ideas will be criticized and then admired.
|
|
November 28, 2023, 11:44:50 PM |
|
The script works like this:
You have a database like this
1010100010110101000101101010001010101000101101000101101010101010001011010100010 1101010001010101000101101010001011011010100010000
target is = 1101010001011010100010101010001
The target is in:
1010100010110101000101101010001010101000101101000101101010101010001011010100010 1101010001010101000101101010001011011010100010000
If we separate in bits:
10101000 1011010 10001011 01010001 01010100 01011010 00101101 01010101 00010110 10100010 11010100 01010101 00010110 10100010 11011010 10001000
No coincidences were found.
Lol, say what? I was asking this: If I want to generate 2^27 keys, but I am limited on RAM, how can I write say 2^20 keys to file, then the next 2^20 keys to file, until all 2^27 keys have been written to file? Using the suggestion or your own, like NotATether was suggesting... i = (i + 1) % 8 Make sense? Lol, Sorry. Added the new script, which solves it.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
GR Sasa
Member
Offline
Activity: 179
Merit: 14
|
|
November 29, 2023, 08:54:33 AM Last edit: November 29, 2023, 11:04:05 AM by GR Sasa |
|
- Can this script be useful for puzzles that don't have public key revealed?
- I wish someone can implement mcdouglasx script in C, it will be faster and more efficient in term of speed and RAM usage.
EDIT: I don't know how this script can be useful against the massive monster #130.
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 12:36:04 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
|
|
|
|
Kpot87
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
November 29, 2023, 01:33:26 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
have you possible to generate DB more than 2**28?
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 02:43:33 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
have you possible to generate DB more than 2**28? I have generated a DB with 2**32 Keys in it.
|
|
|
|
mcdouglasx (OP)
Member
Offline
Activity: 240
Merit: 53
New ideas will be criticized and then admired.
|
|
November 29, 2023, 02:51:54 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
If in subtraction you used 16 to create the db in the search script you should do the same, it is not that they are false positives, it is that the pk calculation is deconfigured if it does not have the correct values.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
Kpot87
Jr. Member
Offline
Activity: 37
Merit: 1
|
|
November 29, 2023, 03:00:07 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
have you possible to generate DB more than 2**28? I have generated a DB with 2**32 Keys in it. how long its take? 3 hours nothing changed? no file *.bin created... what can be wrong& @mcdouglasx
|
|
|
|
sssergy2705
Copper Member
Newbie
Offline
Activity: 188
Merit: 0
|
|
November 29, 2023, 03:08:36 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
have you possible to generate DB more than 2**28? I have generated a DB with 2**32 Keys in it. how long its take? 3 hours nothing changed? no file *.bin created... what can be wrong& @mcdouglasx I have the same. Range 45 bits, 100000000 keys. More than 12 hours of work, but still no database file... The old version of the database creation script worked, the one that first saved it to a text file.
|
|
|
|
sssergy2705
Copper Member
Newbie
Offline
Activity: 188
Merit: 0
|
|
November 29, 2023, 03:10:38 PM |
|
I have generated a DB with 2**32 Keys in it.
Can you tell me how you created the database? Apparently you have a different method for creating a database.
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 03:14:46 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
If in subtraction you used 16 to create the db in the search script you should do the same, it is not that they are false positives, it is that the pk calculation is deconfigured if it does not have the correct values. I used the same subtraction values for the DB and the Scan scripts; and when I used values other than 1, I would get the incorrect values/false positives. A few of what I am talking about. Pk: 11739509615 Pk: 0x2bbbab36f = with subtraction value of 16384 Pk: 3102179535 Pk: 0xb8e780cf = with subtraction value of 32 Pk: 3119592975 Pk: 0xb9f1360f = with subtraction value of 32
The correct result should have been = 0xB862A62E
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 03:17:33 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
have you possible to generate DB more than 2**28? I have generated a DB with 2**32 Keys in it. how long its take? 3 hours nothing changed? no file *.bin created... what can be wrong& @mcdouglasx Can you tell me how you created the database? Apparently you have a different method for creating a database. How many keys are you trying to generate?! For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
|
|
|
|
mcdouglasx (OP)
Member
Offline
Activity: 240
Merit: 53
New ideas will be criticized and then admired.
|
|
November 29, 2023, 03:45:28 PM |
|
Regarding the scan script; if I use any subtract other than one, it always gets a false positive.
I've used subtract values from 16 up to in the thousands and always get a wrong result (false positive).
If you use a large subtraction number, the result shows up way out of the upper limit range.
Can you shed any wisdom as to why?
If in subtraction you used 16 to create the db in the search script you should do the same, it is not that they are false positives, it is that the pk calculation is deconfigured if it does not have the correct values. I used the same subtraction values for the DB and the Scan scripts; and when I used values other than 1, I would get the incorrect values/false positives. A few of what I am talking about. Pk: 11739509615 Pk: 0x2bbbab36f = with subtraction value of 16384 Pk: 3102179535 Pk: 0xb8e780cf = with subtraction value of 32 Pk: 3119592975 Pk: 0xb9f1360f = with subtraction value of 32
The correct result should have been = 0xB862A62E I'll check the script, maybe there's something I'm missing, do you use the "single key"?
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
sssergy2705
Copper Member
Newbie
Offline
Activity: 188
Merit: 0
|
|
November 29, 2023, 03:46:38 PM |
|
How many keys are you trying to generate?! For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
Can you share your script to create the database file? I want to create a file of size 2000000000 keys to test on puzzle 65.
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 03:51:18 PM |
|
How many keys are you trying to generate?! For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
Can you share your script to create the database file? I want to create a file of size 2000000000 keys to test on puzzle 65. I have it prefilled out for you: #@mcdouglasx import secp256k1 as ice from bitstring import BitArray import bitcoin
print("Making Binary Data-Base")
target_public_key = "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b"
target = ice.pub2upub(target_public_key)
num = 2000000000 # number of keys.
sustract = 1 #amount to subtract each time.
Low_m= 200
#2^28 / 2^ 26 = 4 #2^29 / 2^26 = 8 #2^30 / 2^26 = 16 #2^32 / 2^26 = 64
lm= num // Low_m
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, target, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('130Bit.bin', 'wb') binary_file.write(my_str) binary_file.close()
for i in range (1,Low_m): mem= ice.to_cpub(ice.scalar_multiplication(lm).hex()) Apk= bitcoin.multiply(mem, i) Apk_upu= ice.pub2upub(Apk)
A1= ice.point_addition(target, Apk_upu)
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, A1, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('65Bit.bin', 'ab') binary_file.write(my_str) binary_file.close()
It will write to file, every 10,000,000 keys. Let me know if it works for you.
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 04:02:40 PM |
|
I'll check the script, maybe there's something I'm missing, do you use the "single key"?
Yes, the single key. I am pretty sure I was getting the bad results when using the low memory script to generate the database. I can run tests later, but maybe something is throwing it off when using the low memory script and writing to database file every x amount of keys?
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
November 29, 2023, 04:07:52 PM |
|
@WP, do you notice anything in these keys? Pk: 11739509615 Pk: 0x2bbbab36f = with subtraction value of 16384 Pk: 3102179535 Pk: 0xb8e780cf = with subtraction value of 32 Pk: 3119592975 Pk: 0xb9f1360f = with subtraction value of 32 As to why they all end in 5? With subtraction values all end in even numbers. Maybe you could try to test a few things with small size databases and with different values, to check their ending digits.
|
🖤😏
|
|
|
sssergy2705
Copper Member
Newbie
Offline
Activity: 188
Merit: 0
|
|
November 29, 2023, 04:09:17 PM |
|
How many keys are you trying to generate?! For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
Can you share your script to create the database file? I want to create a file of size 2000000000 keys to test on puzzle 65. I have it prefilled out for you: #@mcdouglasx import secp256k1 as ice from bitstring import BitArray import bitcoin
print("Making Binary Data-Base")
target_public_key = "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b"
target = ice.pub2upub(target_public_key)
num = 2000000000 # number of keys.
sustract = 1 #amount to subtract each time.
Low_m= 200
#2^28 / 2^ 26 = 4 #2^29 / 2^26 = 8 #2^30 / 2^26 = 16 #2^32 / 2^26 = 64
lm= num // Low_m
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, target, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('130Bit.bin', 'wb') binary_file.write(my_str) binary_file.close()
for i in range (1,Low_m): mem= ice.to_cpub(ice.scalar_multiplication(lm).hex()) Apk= bitcoin.multiply(mem, i) Apk_upu= ice.pub2upub(Apk)
A1= ice.point_addition(target, Apk_upu)
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, A1, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('65Bit.bin', 'ab') binary_file.write(my_str) binary_file.close()
It will write to file, every 10,000,000 keys. Let me know if it works for you. binary_file = open('130Bit.bin', 'wb') ---------------------------------------- binary_file = open('65Bit.bin', 'ab') I understand the meaning, only the names of the files need to be changed)
|
|
|
|
WanderingPhilospher
Full Member
Offline
Activity: 1078
Merit: 219
Shooters Shoot...
|
|
November 29, 2023, 04:23:33 PM |
|
How many keys are you trying to generate?! For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
Can you share your script to create the database file? I want to create a file of size 2000000000 keys to test on puzzle 65. I have it prefilled out for you: #@mcdouglasx import secp256k1 as ice from bitstring import BitArray import bitcoin
print("Making Binary Data-Base")
target_public_key = "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b"
target = ice.pub2upub(target_public_key)
num = 2000000000 # number of keys.
sustract = 1 #amount to subtract each time.
Low_m= 200
#2^28 / 2^ 26 = 4 #2^29 / 2^26 = 8 #2^30 / 2^26 = 16 #2^32 / 2^26 = 64
lm= num // Low_m
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, target, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('130Bit.bin', 'wb') binary_file.write(my_str) binary_file.close()
for i in range (1,Low_m): mem= ice.to_cpub(ice.scalar_multiplication(lm).hex()) Apk= bitcoin.multiply(mem, i) Apk_upu= ice.pub2upub(Apk)
A1= ice.point_addition(target, Apk_upu)
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, A1, sustract_pub) binary = '' for t in range (lm):
h= (res[t*65:t*65+65]).hex() hc= int(h[2:], 16) if str(hc).endswith(('0','2','4','6','8')): A="0" binary+= ''.join(str(A)) if str(hc).endswith(('1','3','5','7','9')): A="1" binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('65Bit.bin', 'ab') binary_file.write(my_str) binary_file.close()
It will write to file, every 10,000,000 keys. Let me know if it works for you. binary_file = open('130Bit.bin', 'wb') ---------------------------------------- binary_file = open('65Bit.bin', 'ab') I understand the meaning, only the names of the files need to be changed) Correct, good catch. Change the one to 65Bit as well.
|
|
|
|
mcdouglasx (OP)
Member
Offline
Activity: 240
Merit: 53
New ideas will be criticized and then admired.
|
|
November 29, 2023, 04:32:47 PM |
|
I'll check the script, maybe there's something I'm missing, do you use the "single key"?
Yes, the single key. I am pretty sure I was getting the bad results when using the low memory script to generate the database. I can run tests later, but maybe something is throwing it off when using the low memory script and writing to database file every x amount of keys? I just created a db with low memory and all the results were correct. share your script Maybe you are not putting this part the same as when you created the db. sustract= 16 #amount to subtract each time. If you create a db with subtract= 16 in scan it should be the same. If everything is correct and you continue to receive different pk, raise the collision margin a little from 64 to 80 (the higher the range you scan, the more likely a false positive is).
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
|