iceland2k14 / bsgs Goto Github PK
View Code? Open in Web Editor NEWFind PrivateKey of corresponding Pubkey(s) using BSGS algo
License: MIT License
Find PrivateKey of corresponding Pubkey(s) using BSGS algo
License: MIT License
python --version Python 2.7.18
python pubsub.py 02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630 100000 120 keysub120.bin
File "pubsub.py", line 97
if m%10000==0: print('[+] Finished Total SubKeys # ', m, end= '\r')
^
SyntaxError: invalid syntax
python3 --version Python 3.8.5
python3 pubsub.py 02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630 100000 120 keysub120.bin
Traceback (most recent call last):
File "pubsub.py", line 40, in
ice = ctypes.CDLL('ice_secp256k1.dll')
File "/usr/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: ice_secp256k1.dll: cannot open shared object file: No such file or directory
python3 pubsub.py 02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630 100000 120 keysub120.txt
Traceback (most recent call last):
File "pubsub.py", line 40, in
ice = ctypes.CDLL('ice_secp256k1.dll')
File "/usr/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: ice_secp256k1.dll: cannot open shared object file: No such file or directory
Using Ubuntu 20.04 WSL under Win 10
bitcoin keysubtracter from albertobsd works on WSL is the output compatible
Hi bro!
Thank you!!!!
Great job!!!!
Hi
Is there any solution for this error, i m using Ubuntu on Mac m1
python3 bsgs_create_bpfile_bloomfile.py 400000000 bpfile.bin bloomfile.bin 4
Traceback (most recent call last):
File "/home/bane/bsgs/v6_dll_bsgs/bsgs_create_bpfile_bloomfile.py", line 16, in <module>
import secp256k1 as ice
File "/home/bane/bsgs/v6_dll_bsgs/secp256k1.py", line 29, in <module>
ice = ctypes.CDLL(pathdll)
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/bane/bsgs/v6_dll_bsgs/ice_secp256k1.so: cannot open shared object file: No such file or directory
Thanks in advance
Contact with me via telegram @denisvk717
If someone find a privkey for this pubkey in a range:
1:1124bff742a76f92fa3a76f8f6552f (decimal only 89014422443240977657631574972585263 !!! ) Range is mach less then origginal 120 Puzle range !!!
pubkey:
03c95ba9e6a637e739d13a6d036507ecc37a70c26e68ac7e5f157268311c6c3938
02c95ba9e6a637e739d13a6d036507ecc37a70c26e68ac7e5f157268311c6c3938
search in publey what start with 02 some faster than 03.
you can try any of this pubkeys.
Proof of my succes tests with another ranges and same pubkeys one what start with 03, and anower start with 02:
Working on Pubkey: 049fa3ea651e72c5f0a660c7ae509ad180860477283f539c918a2e43514c29da92237c8751b32e5 90883aa8bd617c60aa6b388aa78381cc7adb10046a33b038598
Using [Number of CPU Threads: 3] [DP size: 10] [MaxStep: 1]
............................................
Scanning Range 0x1 : 0x100000000000000
[55.22 TeraKeys/s][Kang 3072][Count 2^27.92/2^29.06][Elapsed 48s][Dead 0][RAM 25.8MB/44.7MB]
============== KEYFOUND ==============
Kangaroo FOUND PrivateKey : 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbf59aefd71d64b15
Working on Pubkey: 049fa3ea651e72c5f0a660c7ae509ad180860477283f539c918a2e43514c29da92dc8378ae4cd1a 6f77c557429e839f5594c775587c7e338524effb95bc4fc7697
Using [Number of CPU Threads: 3] [DP size: 10] [MaxStep: 1]
............................................
Scanning Range 0x1 : 0x100000000000000
[42.05 TeraKeys/s][Kang 3072][Count 2^28.68/2^29.06][Elapsed 01:26][Dead 0][RAM 37.7MB/44.7MB]
============== KEYFOUND ==============
Kangaroo FOUND PrivateKey : 0x0000000000000000000000000000000000000000000000000078af8f5e5ff62c
We are spit 1.2 btc 50/50 after with someone who publication in this thread privkey first, all others member sorry... !!!
Lets DO IT ???
Oficila thread - https://bitcointalk.org/index.php?topic=5358408.0
hi
Public key of F0001000000000001 is
04F50CF235C38DAF3106727063CC3EE9EFC631A08F99F77C6A5B8AAA03D9007DBB439209AE5FB59096FCC5874ED940906D2580928CF74028C1C3E1F5AF496D1414
i added in 1.txt
then run this code
python bsgs_hybrid_dll_secp256k1.py -pfile 1.txt -b bPfile.bin -bl bloomfile.bin -n 500000000000000 -keyspace F0001000000000001:F0001000500000001
result : bsgs found private key F0001000000000001
but when i add the Public key of F0001000000000002 to 1.txt .
It cant find it
why?
There are so little arguments to use. Thus i can't see the acceleration as written earlier. :)
With keyhunt i used 15 threads and got a speed of 1x10^15 per 1 (one!!!) thread. (1000 trillion per thread).
Running this code i see just 500 trillions per 15 threads... Very slow.
May be i need to create a bPfile with much more elements in it?
I created it with 50M points.
What is relation of bPfile to used n ?
@iceland2k14 Hello can you tell me what this program does, I want to get the private key of bitcoin wallet where I have the wallet address and the public key and two transactions but I do not have a password or the private key does this program help me to find it
HI, i don't know about the Logic of this FULLbpfile.bin File, Could you please Explain, how it is work, what is the
and also could you please explain how much time it will take to complete 02CEB6CBBCDBDF5EF7150682150F4CE2C6F4807B349827DCDBDD1F2EFA885A2630 -keyspace 800000000000000000000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
How do i edit the code to save the search results to a txt file?
For instance it found a key, currently it simply closes the program and doesn't save the results anywhere.
python bsgs_dll_search.py -n 40000000000 -keyspace F00000000000000000000000000000000000000000000000000000f0f2000000:F00000000000000000000000000000000000000000000000000000fff2000000 -b bpfile.bin -bl bloomfile.bin -p 04282773874199B856AC5CB3BE2E0EEDAB47257EA14FFBC4327C1EA2D1A0A39DCE007FA130DB53375A3C42D5DC9546A12158A39D5948607631C99DF57E9E4B63CA
it can find private key . but when i change -keyspace ,it cant find like this
F00000000000000000000000000000000000000000000000000000f0f1000000:F00000000000000000000000000000000000000000000000000000fff2000000
I try use hybrid version and my 8 CPU server loaded only 1 CPU from 8 !!!
Screen https://ibb.co/sPM0YDD
How to run codes to work with all avaliable CPU ?
Thank You very much.
Does the GPU version only work with Nvidia GPUs?
D:\Downloads\bsgs-main(1)\bsgs-main\v5_secp256k1_bloom_dll>python bsgs_hybrid_dll_secp256k1.py -pfile test_pubkeys.txt -b bPfile.bin -bl bloomfile.bin -n 50000000000000000 -rand1
[+] Starting Program : BSGS mode with hybrid algo using bloom dll and secp256k1 dll Version [ 13072021 ]
Traceback (most recent call last):
File "bsgs_hybrid_dll_secp256k1.py", line 311, in
Qlist = [ bytes(bytearray(pub2upub(line))) for line in read_pubkey_file() ]
File "bsgs_hybrid_dll_secp256k1.py", line 311, in
Qlist = [ bytes(bytearray(pub2upub(line))) for line in read_pubkey_file() ]
File "bsgs_hybrid_dll_secp256k1.py", line 278, in pub2upub
return bytes.fromhex('04'+ hex(x)[2:].zfill(64) + hex(y)[2:].zfill(64))
ValueError: non-hexadecimal number found in fromhex() arg at position 131
List of PunKeys
04180bfa57bff462c7641fa0b91efe29344a77086b073cd9c5f769cb2393acc151a4e7377eaabacc39f5b2bd2cd4bcb5ed1855939619e491c79c0bb5793d4edbf3ac
04bb31566291ceb63ed600b0c29d6825d7924e73c265abac43fa088ad3e1a477c6fd15373fc40229cc895732d4175f6db615e4a2b6e9411e92974b6923d7985518ac
04ce29c26fb59eadf6b9b38a3e7f52646877bcdcd7b5f290a47a7a61668bda2c82c8f13f66e8665cfe7594d7da51f431df4df2f60df08ecfd53d2f2d076b4bc24eac
04655798e5ce83da2f24955e16396846528d919c223c9c2945b211b722d55a85ccb8930066eaf34c501ac37c4d41c8e579ccc00f54d5a5f1b3c27de525ece5a5d5ac
046312c744cb65614769150309590257c89cf5d2ee4f048e5a944fa50c768d205ee6083314a55d8b3f9caff539758c13a8f73be4aac6a6e8c5a917dc670e042f11ac
046154d4ed678ddf5fbb9e09ef7d1cf3a8053f5a09fc89303d150d4e715bc691b240c93729cd412d707c48f7bafe41db684c2f9a39aa5995786827e9ed4d185e36ac
0427df882a156b4c29a4d05eec8d0c4b53f976f7e0ee2639dc8cbb6327451b8cf0957abb3418696243f392e73b586ea4b074e5bdc856a234c9e174615e3bbcea24ac
04a449ee292e46745b6e8e350a04777ee938f151af438a6b80c2fb86a65e71e6a677897ef1f8e997dcddc024d92639620e09021710ae3076836c90f3fa2fcdedd3ac
04462b00d67b254e4b10de6fe0b277b6a34f2438758fc5fc2c18c5b53e9352322b94d2be6ca5a2557ebf55905f7dc6cca699162b0faf919754b5ca369d31d0bb31ac
0492ade9a7a1fde25016c02d223e2f1c501d2af11b492e0a3f0cd617a01798c5f5eabd9d5957a7b2d66d1b42f688a6fd5d2bc60ad0d7a00f6006fc4838fb4c248aac
04c9eb99d7bbbd9acfab695c8aa8b931beb43292f2fecdc19d7e687b524d2e2c8a9d167f9be930634adae005424b441a9de8e8c15d8b2462661eb78418a8aba662ac
04e049e5c6fb83743c8ef0a640cc82ea14191026643e3e2a1c84edf168bb9690f3c201d04a30c8609aa9406c1eb565e1b9fa218317da5177060de158f25ccc879dac
04da82f7361830281e40cf9a8fbc5fea33f35d52ef06b7a72e4b12665374f843839f4a7ad2021e07377c58eb14cc1d01d2017a38281910b6935182cff99930dd8bac
04a4a43c49a491bcad58a1578ddeed00ee13ac58c33a4d50fdb0b06d2ca97b6791097e127f9a4fe2d8f952b2420ef82c669c84d3e65d4fce257d707ec214562c29ac
0455f09e54cc544e9f61d0394db1bec90c30ea89c88c554196ebb68e9c8e02c5ea7f3291521dddb44abee835ed376152f04039634ae7af2b5ef2587776348d0b34ac
048644947f13359243d46be6436fb04bc20f92c1ed34b9548b31838bdb5ef721da70c360f2a8886e47addf7b3f87142b5245d95c9bbd6e36f43055998174db8417ac
what it can be? thank you
What program do you use to extract pubkeys from the blokchain?
Hi. What is the difference rand and rand1
for Q in Qlist:
found = bsgs_keys(Q, k1, k2)
You call this code for each public key but it may have been generated in the previous Q
.
Traceback (most recent call last):
File "/home/pianist/bsgs-main/v5_secp256k1_bloom_dll/bsgs_hybrid_dll_secp256k1.py", line 115, in
ice.hash_to_address.argtypes = [ctypes.c_int, ctypes.c_bool, ctypes.c_char_p] # 012,comp,hash
File "/usr/lib/python3.9/ctypes/init.py", line 387, in getattr
func = self.getitem(name)
File "/usr/lib/python3.9/ctypes/init.py", line 392, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /home/pianist/bsgs-main/v5_secp256k1_bloom_dll/ice_secp256k1.so: undefined symbol: hash_to_address
[+] Starting Program.... Please Wait !
[+] Search Mode: Sequential search in the given range
[2022-10-15.09:11:47] [Info] Starting at : 800000000000000000000000000000 (120 bit)
[2022-10-15.09:11:47] [Info] Ending at : 80000000000000002386F26FC10000 (120 bit)
[2022-10-15.09:11:47] [Info] Initializing NVIDIA GeForce RTX 2080 Ti
[2022-10-15.09:13:11] [Info] Allocating bloom filter (64.0MB)
[2022-10-15.09:13:14] [Info] Error: invalid argument
fix this?
A False collision ignored. Bloom collision, but No bPfile collision. Do I need to make the bpfile again? Also pubsub works fine in windows but no luck in linux, cannot import the dll. Are you going to make a ubuntu version?
Can it be modified somehow to write sequential pubkeys to external files at this much speed.
when I execute the command:
python bsgs_hybrid_dll_gmp.py -pfile testpk.txt -b mybpfile.bin -bl mybloom.bin -keyspace 1:0x1000
[+] Range Finished
testpk.txt content in below:
02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
04c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee51ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a
02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
04f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672
private_key = 0x2 :
compressed publickey:
02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5
uncompressed publickey:
04c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee51ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a
private_key = 0x3 :
compressed publickey:
02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
uncompressed publickey:
04f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672
bsgs_hybrid_dll_gmp.py does NOT find the privatekey when the publickey is generated by 0x2.
but it finds the correct result when the publickey is generated by 0x3.
@iceland2k14 something is wrong? could you help me,please
python create_bPfile.py 20000000 bPfile.bin
my computer has 32 gigabyte RAM, how many million should I put in a file?
Hello. Please explain what the bloom file is for and what its size affects for, search speed?
Is it possible to run gpu search to find multiple keys?
Thanks for the amazing work.
Can I use a swap file to increase RAM? To create a filter bloom.
if 2 same points use point_addition , the result wrong.
Hello
bsgs_GPU.py in your git project : https://github.com/iceland2k14/bsgs/tree/main/v7_gpu_trial
Total sequential search in 1 loop default=10000000000000000
How can I do it in c#. Could you help.
in your project, it finishes the 54 bit range in 15 minutes.
GPUEngine.cu file where should i change ?
thanks for the answer.
what is dependencies?
Hello.
Why don't you use only the X coordinate for the search to save calculation time?
hi
1: random have problem for rand in range ... It is always larger in number
for example : thıs range 1:ffffffff ===> Program output ==> 88888888 and 45621478 and 98545651
never see lıke 00000008 or 654f
2: program need found.txt
thanks
Hi,
I think that the last version of your code which includes the bloom filter can return false positive private key since bloom filter is a probabilistic data structure. So I am not sure if it is relevant to include it in the code. What do you think about it?
Thank you for this great project.
Can you please modify it to generate Addresses from the public key retrieved from hex and then search for that Address in the given range?
I mean, for example, searching for 17s2b9ksz5y7abUm92cHwG8jEPCzK3dLnT in a given range.
I have tested multiple scripts, wrote my own but your script/algorithm has great speed really.
Hi,
bpfile.bin file how much can be big?
could you explain how to change base generator for bsgs_dll? now you have set up for G , I would change for other pubkey or can you share ice_secp256k1.so as source for changing? and source for file: bsgs.so?
When running in Ubuntu 20.04, Cuda 11.4
Good day Iceland !
Make please multy CPU version ? PLEEEASE.
Regard
I am more inexperienced. Can you help with the installation of the program?
I get this error whet trying convert bPfile with: python bPfile_2_bloom_dll_batch.py bpfile.bin bloomfile.bin
Any recommendation to fix this?
Thanks in advance
`\v5_secp256k1_bloom_dll> python bPfile_2_bloom_dll_batch.py bpfile.bin bloomfile.bin
Traceback (most recent call last):
File "C:\Users\bane\bsgs1\v5_secp256k1_bloom_dll\bPfile_2_bloom_dll_batch.py", line 27, in <module>
mylib = ctypes.CDLL('bloom_batch.dll')
File "C:\Users\bane\AppData\Local\Programs\Python\Python39\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'bloom_batch.dll' (or one of its dependencies). Try using the full path with constructor syntax.
PS C:\Users\bane\bsgs1\v5_secp256k1_bloom_dll> ls
Directory: C:\Users\bane\bsgs1\v5_secp256k1_bloom_dll
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/20/2022 10:57 PM 119808 bloom_batch.dll
-a---- 10/20/2022 10:57 PM 46296 bloom_batch.so
-a---- 10/23/2022 1:10 PM 640000000 bPfile.bin
-a---- 10/20/2022 10:57 PM 3926 bPfile_2_bloom_dll_batch.py
-a---- 10/20/2022 10:57 PM 18035 bsgs_dll_secp256k1.py
-a---- 10/20/2022 10:57 PM 20465 bsgs_hybrid_dll_secp256k1.py
-a---- 10/20/2022 10:57 PM 4568 create_bPfile_mcpu2.py
-a---- 10/20/2022 10:57 PM 3741184 ice_secp256k1.dll
-a---- 10/20/2022 10:57 PM 366552 ice_secp256k1.so
-a---- 10/20/2022 10:57 PM 5142 PubSub.py
-a---- 10/20/2022 10:57 PM 10018 README.md
-a---- 10/23/2022 1:07 PM 528 test_pubkeys.txt
`
can you share source code of bloom
Good day Iceland !!!
Thank you for you soft !!!
Iceland, the I use /python v5_secp256k1_bloom_dll/bPfile_2_bloom_dll_batch.py bpfile.bin bloomfile.bin blomfilters creates with speed only 1 thread, so for 22000 chunks for 22000000000 bpeliments, speed is only 3000 chunks in 6 hours !!!! This is normal ?
Then I use a https://github.com/iceland2k14/bsgs/tree/main/v6_dll_bsgs he work in 1 thread too, and make a bPfile size downgrade from 320Gbit to 3,2Gb only this is normal ?
How to spped up creatind of bloom filter ?
p.s. I'm work in linux ubuntu. I windows is I have no succes of run scrypts unfortunately.
Regard
Hello.
Can you add support for checking multiple public keys to your script bsgs_v4_gmp.py ?
Assuming the key file is large, approximately 5 million public keys.
i just see your working code, its difrent from my invented 8 month old code , where i load in same ram 10x mean 100m keys and my logics, thats will work more 10 time faster then these codes, discus here or in discord group, ?
hello @iceland2k14 thanks for your awesome work , i was trying to create bp file around 700gb but after 15 days this reached at 300gb and power failed ~ i am really upset now. could you please point to some fasted bloom filter program or method which can use multiple tread and create bp file instantly or at lease in one day. my pc is not some under power but not sure why this process is so slow. even i used multiple tread switch like i was using 19 cores to create bp. help ~
tested on on puzzle 38 but did not detect private key both on windows and ubuntu. Tried on alberto's detected immediately. also getting intermittent segmentation faults seems to be tied to -n value.
python bsgs_dll_secp256k1.py -p 03c060e1e3771cbeccb38e119c2414702f3f5181a89652538851d2e3886bdd70c6 -b bPfile.bin -bl bloom.bin -n 500000000 -keyspace 0:7fffffffff
for example i want to run this code:
python bsgs_hybrid_dll_secp256k1.py -pfile 1.txt -b bPfile.bin -bl bloomfile.bin -n 8000000 -keyspace FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0AAEDCE6AF48A03BBFD25E8CD0364141:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
but what's differ between two code:
python bsgs_create_bpfile_bloomfile.py 3000000000 bpfile.bin bloomfile.bin 4
python bsgs_create_bpfile_bloomfile.py 10000000000 bpfile.bin bloomfile.bin 4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.