Search content
Sort by

Showing 20 of 31 results by Mikorist
Post
Topic
Board Announcements (Altcoins)
[ANN] CROCOcoin [Ghostrider / Masternode]
by
Mikorist
on 17/01/2023, 08:40:40 UTC


About:

CROCOcoin is an open source community-owned electronic coin designed to conduct transactions in game projects such as PvP over the network. 51% attack protection guarantees you a stablecoin that will expand and evolve thanks to the community as well as our innovations. Our ecosystem will grow with a library of quality online PvP games where you can earn or multiply your CROCO.


Coinomic:

Total Supply: 21 Billion
Ticker: CROCO
Algorithm: GhostRider
Block Reward: 5000 CROCO
Reward Comissions: 2%
51% Protection: Yes


Link:

WebSite:
(in developing)

Windows Wallet:
https://github.com/CrocoCoin-Core/CROCO-Coin/releases/download/CROCO-Coin/CROCOcoin.zip



Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
Mikorist
on 25/12/2022, 20:18:44 UTC

https://github.com/AlexCurl/bitcoin_tools/blob/main/secp256k1/secp256k1.py

Could numba be inserted into this code? I have not yet seen secp256k1 that the calculations go through @jit - that it has full GPU support.

if you are on python just use this library: https://github.com/iceland2k14/secp256k1
fastest out there for python since .dll(Windows) and .so(Linux) are shared libraries containing compiled functions written in C++ ready to load and use.
Most my codes that are there just good for testing and research. That is what I do mostly.
For CPU best option is VanitySearch code base it is the fastest.
It is in C++ and easy to understand and use.


I want to make one that will do 300Miilion Key/s from python. One or more GPUs....The only way is through mumba and jit.
https://numba.pydata.org/
And nowhere is there an example of how to calculate secp256k1 through @jit . These are simple mathematical formulas, not rocket science.
Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
Mikorist
on 25/12/2022, 16:42:12 UTC
Why BitCrack doesn't support new types of adress? (from '3' or 'bc' starting)?

And another quesion. Is this adresses also generating from the same space of numbers as P2PKH keys? I mean, that for example I have a private key
 
Code:
36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068

For this key I have two P2PKH adresses  1AxSQFHqQ2nFUbZwcWSmHYrYumuQnK2nYG 12b9TofPY9R5gtKRUHBWjQrNP6mBYZuFqr. Can I generate also P2SH adress using this key?

Private key: 36a9e7f1c95b82ffb99743e0c5c4ce95d83c9a430aac59f84ef3cbfab6145068
WIF_U: 5JEMthkwtXqFvRkMbDMPDV7ghskD6ikM59ZQRoFEzXDAoDUq7qz
WIF_C: Ky3yDCtyGT5zrpEMt1Wy476WFQyiQFGKbJn2QT7rktLiEz1dN1nj
X:e589eea87b3f9f14384e32a0036c0f3b41fd071fbaaa37e07196a9acfd8e68b7 Y:1808b5a13bf67ed98145b9c1338ef176131620cfc4503def199364906bbbcc4f
Hash160_U: 6d3536a61d6308915bcc3b72476b7e40d27b08ce
Hash160_C: 116d5513840ce377f0a76a64ed247f34e3bbdf0f
Address_U: 1AxSQFHqQ2nFUbZwcWSmHYrYumuQnK2nYG
Address_C: 12b9TofPY9R5gtKRUHBWjQrNP6mBYZuFqr
Address_P2SH: 31iwoQNky2ZMHEgYnTnARVmHEHArTqwLUq
Address_Bech32_P2WPKH: bc1qz9k42yuypn3h0u98dfjw6frlxn3mhhc07pwhqg
Address_Bech32_P2WSH: bc1qmvkw2tle32krer6qxc906zanccl9lmrhx0nzh3yharyeaavwxjwsqcyayx
Address_Bech32m_P2TR: bc1pq7ypqza85dqdywnrsmkwy8pvyypysu6gq5gzqeepr4ngg0ru5ulqfz886e
Taproot Tweaked privkey: 9ac5d0501220a1d462bc021f3e03264232dfc05e03bee4745f6f8e59d67bc161
Taproot Tweaked pubkey: 0788100ba7a340d23a6386ece21c2c210248734805102067211d66843c7ca73e


Did You create them manually or using bitcrack?
Using secp256k1 library: https://github.com/AlexCurl/bitcoin_tools/blob/main/ecc_gmp_C/main.c

https://github.com/AlexCurl/bitcoin_tools/blob/main/secp256k1/secp256k1.py

Could numba be inserted into this code? I have not yet seen secp256k1 that the calculations go through @jit - that it has full GPU support.
Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
Mikorist
on 21/12/2022, 20:18:30 UTC
Please tell me if the version of bitcrack would take private key from the file txt?

I have a large database of 10Gb+ private keys, can I check them for bitcrack? what would be the speed of the file?

- how much will it cost to be able to check private keys (sha256) from a file txt?

(I know about brainflayer, but its speed is very slow, (100,000p/s)

I can only load a large list on clBitCrack  but hashrate is terrible  - cuBitCrack doesn't work for more than 16 addresses...no matter how I compile it from source.
Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
Mikorist
on 20/12/2022, 16:40:48 UTC
I Cant add more than 16 keys to file

Code:
Loading addresses from 'list.txt'
 27 addresses loaded (0.0MB)
Allocating bloom filter (0.0MB)
 Error: invalid argument

Quote
./cuBitCrack -d 0 -i list.txt -b 1024 --continue continue.txt -o out.txt --keyspace e4a74a27db001d1be11a96e34c23332b7b6e09d52daaee2b7dee982c656aad114d82112f4408

I think the error comes from

./CudaKeySearchDevice/CudaHashLookup.cu

after "Allocating bloom filter"

Reported on github. Does anyone have a similar problem?

cuda_11.2.r11.2/compiler.29618528_0
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 20/12/2022, 13:21:39 UTC


Try to generate mandelbrot without GPU

https://numba.pydata.org/numba-doc/dev/user/examples.html#mandelbrot

0.3226363949943334 seconds with GPU
90 seconds with CPU
I get 0.21194690400443505 when running the original mandelbrot code and 2.2377483489981387 when commenting the "from numba import jit" and "@jit..." lines.


It can't work like this. I'm stupid one. Only calculation operations can be defined after @jit - and definitions separately through cpu
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 11/12/2022, 19:58:18 UTC
if it's correct to have float64 used here, possibly it could throw some error when reaching the limits for allocating for the array.

I don't know another way to test. This is the only one I could find online.

https[Suspicious link removed]cuting-a-python-script-on-gpu-using-cuda-and-numba-in-windows-10-1a1b10c29c9

And I barely managed to set up the drivers for numba to work through python. Reinstallation of the entire system and drivers again in a circle until I succeeded.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 11/12/2022, 19:32:52 UTC
are you sure this will run on GPU? I quickly tested it and I see only 1 CPU thread being used at 100% for the program. There is absolutely no GPU utilization, GPU = 0%

Sure.

Code:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import numpy as np
import numba
from numba import cuda, jit
from timeit import default_timer as timer
# Run on CPU
def cpu(a):
    for i in range(10000000):
        a[i]+= 1
# Run on GPU
numba.jit()
def gpu(x):
    return x+1
if __name__=="__main__":
    n = 10000000
    a = np.ones(n, dtype = np.float64)
    start = timer()
    cpu(a)
    print("without GPU:", timer()-start)
    start = timer()
    gpu(a)
    numba.cuda.profile_stop()
    print("with GPU:", timer()-start)
There is no theory that my  CPU can go 10 milon operations for 0.08 seconds
without GPU: 3.9892993430003116 seconds
with GPU: 0.08131437800147978  seconds
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 11/12/2022, 17:54:23 UTC
Cool thanks .. Can you test speed and post results for us?

Here is GPU version

 
Code:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import numba
from numba import cuda, jit
import time
import base58
import binascii, base58
import string
import secrets
import secp256k1 as ice
from time import sleep


os.system('clear')

print(t, 'GOOD LUCK AND HAPPY HUNTING....')


#puzzle 66
addr="13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
x=57191151445131609186
y=57191152174079909761

numba.jit()
while True:
    dec0 = secrets.SystemRandom().randrange(x,y)     
    hex = "%064x" % dec0
    WIF=ice.btc_pvk_to_wif(hex)
    if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
        if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex,16)
                       
        elif WIF.startswith('K') or WIF.startswith('L'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex[0:64],16)
        HEX = "%064x" % dec
        wifc = ice.btc_pvk_to_wif(HEX)
        wifu = ice.btc_pvk_to_wif(HEX, False)
        uaddr = ice.privatekey_to_address(0, False, dec)
        caddr = ice.privatekey_to_address(0, True, dec)
        #first_5 = addr[:5]
       
        if uaddr.startswith('13zb1h') or caddr.startswith('13zb1h'):
            t = time.ctime()
            print('Time : ', t)
            print('PrivateKey (hex) : ', HEX)
            print('PrivateKey (dec) : ', dec)
            print('PrivateKey (wif) Compressed   : ', wifc)
            print('PrivateKey (wif) UnCompressed : ', wifu)
            print('Bitcoin Address Compressed   = ', caddr)
            print('Bitcoin Address UnCompressed = ', uaddr)
            print("\n continue...\n")
     
        if uaddr in addr or caddr in addr:
            t = time.ctime()
            print (t,'WINNER WINNER Check WINNER.txt')
            f=open('WINNER.txt','a')
            f.write('==========================================================================================\n')
            f.write(f"{t}\nPrivateKey (hex): {HEX}\nBitcoin Address Compressed    : {caddr}\nBitcoin Address UnCompressed  : {uaddr}\nPrivateKey (wif) Compressed   : {wifc}\nPrivateKey (wif) UnCompressed : {wifu}\n")
            f.write('==========================================================================================\n')
            f.close()   
            sleep(4)
            break

About a million in 0.02 seconds on my old laptop. Grin
Post
Topic
Board Development & Technical Discussion
Re: Is there a way to use Python GPU for ECC speed up?
by
Mikorist
on 11/12/2022, 16:30:13 UTC

I had driver problems on Debian 11

Code:
sudo nano  /etc/modprobe.d/blacklist-nouveau.conf
blacklist-nouveau.conf :

Code:
lacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

Then reboot and reinstall
Code:
sudo apt -y install  nvidia-cuda-toolkit nvidia-cuda-dev nvidia-driver

It works like this. GPU must be specified as  "0" . Or who has more than one of them in the same command.
Code:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import numpy as np
import numba
from numba import cuda, jit
from timeit import default_timer as timer
from fastecdsa import keys, curve
import secp256k1 as ice
# Run on CPU
def cpu(a):
    for i in range(100000):
        dec   = keys.gen_private_key(curve.P256)
        HEX   = "%064x" % dec
        wifc  = ice.btc_pvk_to_wif(HEX)
        wifu  = ice.btc_pvk_to_wif(HEX, False)
        uaddr = ice.privatekey_to_address(0, False, dec)
        caddr = ice.privatekey_to_address(0, True, dec)
        a[i]+= 1
# Run on GPU
@numba.jit(forceobj=True)
def gpu(x):
    dec   = keys.gen_private_key(curve.P256)
    HEX   = "%064x" % dec
    wifc  = ice.btc_pvk_to_wif(HEX)
    wifu  = ice.btc_pvk_to_wif(HEX, False)
    uaddr = ice.privatekey_to_address(0, False, dec)
    caddr = ice.privatekey_to_address(0, True, dec)
    return x+1
if __name__=="__main__":
    n = 100000
    a = np.ones(n, dtype = np.float64)
    start = timer()
    cpu(a)
    print("without GPU:", timer()-start)
    start = timer()
    gpu(a)
    numba.cuda.profile_stop()
    print("with GPU:", timer()-start)


Result
without GPU: 10.30411118400002
with GPU: 0.2935101880000275

 Grin
Post
Topic
Board Development & Technical Discussion
Re: Is there a way to use Python GPU for ECC speed up?
by
Mikorist
on 11/12/2022, 06:15:33 UTC
I have no idea how secp256k1 as ice & fastecdsa  optimized for GPU jit, (maybe not at all) but we can test this way...Without experimentation there is no progress.

You have to install the CUDA Toolkit for this & numba on Linux....
Code:
conda install numba & conda install cudatoolkit
or
Code:
pip3 install numba numpy fastecdsa
(etc...)

Code:
from numba import jit
import numpy as np
from timeit import default_timer as timer
from fastecdsa import keys, curve
import secp256k1 as ice
# Run on CPU
def cpu(a):
           dec   = keys.gen_private_key(curve.P256)
           HEX   = "%064x" % dec
           wifc  = ice.btc_pvk_to_wif(HEX)
           wifu  = ice.btc_pvk_to_wif(HEX, False)
           uaddr = ice.privatekey_to_address(0, False, dec)
           caddr = ice.privatekey_to_address(0, True, dec)
           print(wifu, uaddr)
# Run on GPU
@jit
def gpu(x):
           dec   = keys.gen_private_key(curve.P256)
           HEX   = "%064x" % dec
           wifc  = ice.btc_pvk_to_wif(HEX)
           wifu  = ice.btc_pvk_to_wif(HEX, False)
           uaddr = ice.privatekey_to_address(0, False, dec)
           caddr = ice.privatekey_to_address(0, True, dec)
           print(wifu, uaddr)
if __name__=="__main__":
    n = 30000000
    a = np.ones(n, dtype = np.float64)
    start = timer()
    cpu(a)
    print("without GPU:", timer()-start)
    start = timer()
    gpu(a)
    numba.cuda.profile_stop()
    print("with GPU:", timer()-start)
Post
Topic
Board Development & Technical Discussion
Re: Is there a way to use Python GPU for ECC speed up?
by
Mikorist
on 10/12/2022, 21:40:58 UTC


I know that in C++, you could use Boost library/dependency to have bigger integer variables. Is there a way to do the same in Python GPU?


There is a way, but there are many readings until the final implementation.

https://documen.tician.de/pycuda/array.html
Post
Topic
Board Development & Technical Discussion
Re: Is there a way to use Python GPU for ECC speed up?
by
Mikorist
on 10/12/2022, 20:27:30 UTC
https://github.com/iceland2k14/secp256k1 fastest library for python.

And fastecdsa......


Code:
from fastecdsa import keys, curve
import secp256k1 as ice

while True:
           dec   = keys.gen_private_key(curve.P256)
           HEX   = "%064x" % dec
           wifc  = ice.btc_pvk_to_wif(HEX)
           wifu  = ice.btc_pvk_to_wif(HEX, False)
           uaddr = ice.privatekey_to_address(0, False, dec)
           caddr = ice.privatekey_to_address(0, True, dec)
           print(wifu, uadr)

Check how fast this simple generator is....Millions per second. Grin
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 09/12/2022, 09:36:39 UTC

Because I need a universal solving script.

Code:
==================================
Time: Tue Nov  8 19:08:06 2022
PrivateKey (hex): dcae05e03a07463dc195bd0a16941162e810f34c443252e1916894800f99f6b1
Bitcoin Address Compressed : 1Myn5hoo8pghPZBTTibLjoksVH1k1Fgxmd
Bitcoin Address UnCompressed :1BZTUTCAv7KRR1uAs4ekgY4KSvrmsTjG61
PrivateKey (wif) Compressed : L4cgbejhcrqGVwC7qL3owVJSS87zJm53JCpoFokX555vbxizf4RL
PrivateKey (wif) UnCompressed : 5KVUYsEke8DJ76wBA8wZPKCCes6fMnnKeRtA7yp1vV7Z5pv5JMA
==================================

You can search for any range you want.

Code:
import os
import time
import base58
import binascii
import secrets
import secp256k1 as ice
from time import sleep

os.system('clear')
t = time.ctime()
print(t, "GOOD LUCK AND HAPPY HUNTING...")

#puzzle 65
address="13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
x=58191152174077909762
y=59191152174087909762

while True:
    dec0 = secrets.SystemRandom().randrange(x,y)     
    hex = "%064x" % dec0
    WIF=ice.btc_pvk_to_wif(hex)
    if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
        if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex,16)
                       
        elif WIF.startswith('K') or WIF.startswith('L'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex[0:64],16)
       
        HEX = "%064x" % dec
        wifc = ice.btc_pvk_to_wif(HEX)
        wifu = ice.btc_pvk_to_wif(HEX, False)
        uaddr = ice.privatekey_to_address(0, False, dec)
        caddr = ice.privatekey_to_address(0, True, dec)
        first_5 = address[:5]
    if caddr.startswith('first_5'): 
       t = time.ctime()
       print('Time : ', t)
       print('PrivateKey (hex) : ', HEX)
       print('PrivateKey (dec) : ', dec)
       print('PrivateKey (wif) Compressed   : ', wifc)
       print('PrivateKey (wif) UnCompressed : ', wifu)
       print('Bitcoin Address Compressed   = ', caddr)
       print('Bitcoin Address UnCompressed = ', uaddr)
       print("\n continue...\n")
    if caddr == address:
       t = time.ctime()
       print("Winner Found!:",t, caddr, wifc)
       f=open('winner.txt','a')
       f.write('\nTime: ' + t + '\nPrivateKey (hex): ' + HEX + '\nBitcoin Address Compressed : ' + caddr + '\nBitcoin Address UnCompressed :' + uaddr + '\nPrivateKey (wif) Compressed : ' + wifc + '\nPrivateKey (wif) UnCompressed : ' + wifu + '\n==================================')
       f.close()
       sleep(4)
       break
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 09/12/2022, 08:06:47 UTC
I forgot to write if you have a key with, say, 4 or no matter how much unknown characters in various places - then the code is like this

Code:
    unk1 = ''.join(secrets.choice(alphabet) for i in range(1))
    unk2 = ''.join(secrets.choice(alphabet) for i in range(1))
    unk3 = ''.join(secrets.choice(alphabet) for i in range(1))
    unk4 = ''.join(secrets.choice(alphabet) for i in range(1))
    unkX......................................................
   
Code:
    WIF=f"5J{unk1}5bCRZhi{unk2}5sEGMpmc{unk3}ZdpAhmWLRfMnutGn{unk4}"
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 09/12/2022, 06:37:46 UTC
Last 10 characters are missing - for about 5 seconds - or was this a lucky/easy combination..... Grin
I think this has to do with the local time and when the key was generated. Now I have a new hobby. Going back in time on the computer - when the puzzle was created

Code:
sudo date --set="2015-01-15 17:07"
Grin
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 08/12/2022, 14:23:18 UTC
Code:
import os
import time
import base58
import binascii
import secrets
import secp256k1 as ice
from time import sleep

os.system('clear')
t = time.ctime()
print(t, "GOOD LUCK AND HAPPY HUNTING...")

address="1Myn5hoo8pghPZBTTibLjoksVH1k1Fgxmd"
known="L4cgbejhcrqGVwC7qL3owVJSS87zJm53JCpoFokX55"
while True:
    alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"   
    unknown = ''.join(secrets.choice(alphabet) for i in range(10))
    WIF=(f'{known}{unknown}')
    if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K') or WIF.startswith('K') or WIF.startswith('L'):
        if WIF.startswith('5H') or WIF.startswith('5J') or WIF.startswith('5K'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex,16)
                       
        elif WIF.startswith('K') or WIF.startswith('L'):
            first_encode = base58.b58decode(WIF)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            private_key_hex = private_key.decode("utf-8")
            dec = int(private_key_hex[0:64],16)
       
        HEX = "%064x" % dec
        wifc = ice.btc_pvk_to_wif(HEX)
        wifu = ice.btc_pvk_to_wif(HEX, False)
        uaddr = ice.privatekey_to_address(0, False, dec)
        caddr = ice.privatekey_to_address(0, True, dec)
    if caddr.startswith('1Myn5'):
       t = time.ctime()
       print('Time : ', t)
       print('PrivateKey (hex) : ', HEX)
       print('PrivateKey (dec) : ', dec)
       print('PrivateKey (wif) Compressed   : ', wifc)
       print('PrivateKey (wif) UnCompressed : ', wifu)
       print('Bitcoin Address Compressed   = ', caddr)
       print('Bitcoin Address UnCompressed = ', uaddr)
       print("\n continue...\n")
    if caddr == address:
       t = time.ctime()
       print("Winner Found!:",t, caddr, wifc)
       f=open('winner.txt','a')
       f.write('\nTime: ' + t + '\nPrivateKey (hex): ' + HEX + '\nBitcoin Address Compressed : ' + caddr + '\nBitcoin Address UnCompressed :' + uaddr + '\nPrivateKey (wif) Compressed : ' + wifc + '\nPrivateKey (wif) UnCompressed : ' + wifu + '\n==================================')
       f.close()
       sleep(4)
       break

Here is the script. It's fast as hell on my machine.
An example.
Address: "1Myn5hoo8pghPZBTTibLjoksVH1k1Fgxmd"
Part of the key "L4cgbejhcrqGVwC7qL3owVJSS87zJm53JCpoFokX55"

Last 10 characters are missing - about 5 seconds - or was this a lucky combination. Grin
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 08/12/2022, 07:26:12 UTC
I cannot get your @jolly_jocker code to run correctly.

However, I think what you are trying to achieve is using the known WIF key part and tumble searching the remaining characters to find the WIF private key. I am able to again, use the known key part and add a randomize search for the remaining part and output this in hexadecimal format. It is not any faster than a general hexadecimal search.

I am not sure if you can generate a WIF private key with a check sum and convert/compare ; and then print the WIF key again in the same script.
I do agree that this puzzle is about testing the strength and secure-ness of bitcoin with new, creative code.

This is a basic python script and variation of VanityGen:
Code:
import secrets
import base58
import binascii
from bitcoin import privtopub, pubtoaddr
import sys

vanity = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
btc_addr = ""

while btc_addr[:len(vanity)] != vanity:
    prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qa"
    alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
    postfix = ''.join(secrets.choice(alphabet) for i in range(18))
    first_encode = base58.b58decode(prefix + postfix)
    private_key_full = binascii.hexlify(first_encode)
    private_key = private_key_full[2:-8]
    btc_pubkey = privtopub(private_key.decode())
    btc_addr = pubtoaddr(btc_pubkey)
    
print(private_key.decode())
print(btc_pubkey)
print(btc_addr)

sys.exit()


Hello, Thanks for all your posts !
I modified your script a little, so that it loads the database of all BTC addresses plus searches for puzzle patterns at the same time. Grin
Code:
import os
import time
import secrets
import base58
import binascii
from bitcoin import privtopub, pubtoaddr
import sys
import multiprocessing
from halo import Halo
import random, string
import threading

print("Loading TXT Please Wait and Good Luck...")  
filename ='list.txt'
with open(filename) as f:
    add = f.read().split()
add = set(add)

spinner = Halo(text='Loading', spinner='dots')

r = 0
cores=1 #CPU Control Set Cores
def seek(r):
        F = []
        while True:
            prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qa"
            alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
            postfix = ''.join(secrets.choice(alphabet) for i in range(18))
            first_encode = base58.b58decode(f'{prefix}{postfix}')
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            btc_pubkey = privtopub(private_key.decode())
            btc_addr = pubtoaddr(btc_pubkey)
            spinner.start()
              
            if btc_addr.startswith("13zb1"):
               t = time.ctime()
               spinner.stop()
               print("Pattern Found:",t, btc_addr, private_key)
               print("\n continue...\n")
               spinner.start()

            if btc_addr in add:
               t = time.ctime()
               spinner.stop()
               print("Winner Found!:",t, btc_addr, private_key)  
               f=open(u"Winner.txt","a") #Output File
               f.write('WIF private key: ' + str(private_key) + '\n' +
                            'public key: ' + str(btc_pubkey) + '\n' +
                            'BTC address: ' + str(btc_addr) + '\n\n')
               f.close()
               sleep(1)
               break

#CPU Control Command
if __name__ == '__main__':
        os.system('clear')
        t = time.ctime()
        print(t, "GOOD LUCK AND HAPPY HUNTING...")
        
        jobs = []
        for r in range(cores):
                p = multiprocessing.Process(target=seek, args=(r,))
                jobs.append(p)
                p.start()

Cool thanks .. Can you test speed and post results for us?

It is slow compared to ICE secp256k1. Twice the speed...However, I am currently creating a script that will be Full ICE - to search for lost parts of the private key. About 3 million per second. Grin
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Mikorist
on 07/12/2022, 12:00:16 UTC
I cannot get your @jolly_jocker code to run correctly.

However, I think what you are trying to achieve is using the known WIF key part and tumble searching the remaining characters to find the WIF private key. I am able to again, use the known key part and add a randomize search for the remaining part and output this in hexadecimal format. It is not any faster than a general hexadecimal search.

I am not sure if you can generate a WIF private key with a check sum and convert/compare ; and then print the WIF key again in the same script.
I do agree that this puzzle is about testing the strength and secure-ness of bitcoin with new, creative code.

This is a basic python script and variation of VanityGen:
Code:
import secrets
import base58
import binascii
from bitcoin import privtopub, pubtoaddr
import sys

vanity = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
btc_addr = ""

while btc_addr[:len(vanity)] != vanity:
    prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qa"
    alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
    postfix = ''.join(secrets.choice(alphabet) for i in range(18))
    first_encode = base58.b58decode(prefix + postfix)
    private_key_full = binascii.hexlify(first_encode)
    private_key = private_key_full[2:-8]
    btc_pubkey = privtopub(private_key.decode())
    btc_addr = pubtoaddr(btc_pubkey)
   
print(private_key.decode())
print(btc_pubkey)
print(btc_addr)

sys.exit()


Hello, Thanks for all your posts !
I modified your script a little, so that it loads the database of all BTC addresses plus searches for puzzle patterns at the same time. Grin
Code:
import os
import time
import secrets
import base58
import binascii
from bitcoin import privtopub, pubtoaddr
import sys
import multiprocessing
from halo import Halo
import random, string
import threading

print("Loading TXT Please Wait and Good Luck...") 
filename ='list.txt'
with open(filename) as f:
    add = f.read().split()
add = set(add)

spinner = Halo(text='Loading', spinner='dots')

r = 0
cores=1 #CPU Control Set Cores
def seek(r):
        F = []
        while True:
            prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qa"
            alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
            postfix = ''.join(secrets.choice(alphabet) for i in range(18))
            first_encode = base58.b58decode(prefix + postfix)
            private_key_full = binascii.hexlify(first_encode)
            private_key = private_key_full[2:-8]
            btc_pubkey = privtopub(private_key.decode())
            btc_addr = pubtoaddr(btc_pubkey)
            spinner.start()
             
            if btc_addr.startswith("13zb1"):
               t = time.ctime()
               spinner.stop()
               print("Pattern Found:",t, btc_addr, private_key)
               print("\n continue...\n")
               spinner.start()

            if btc_addr in add:
               t = time.ctime()
               spinner.stop()
               print("Winner Found!:",t, btc_addr, private_key) 
               f=open(u"Winner.txt","a") #Output File
               f.write('WIF private key: ' + str(private_key) + '\n' +
                            'public key: ' + str(btc_pubkey) + '\n' +
                            'BTC address: ' + str(btc_addr) + '\n\n')
               f.close()
               sleep(1)
               break

#CPU Control Command
if __name__ == '__main__':
        os.system('clear')
        t = time.ctime()
        print(t, "GOOD LUCK AND HAPPY HUNTING...")
       
        jobs = []
        for r in range(cores):
                p = multiprocessing.Process(target=seek, args=(r,))
                jobs.append(p)
                p.start()
Post
Topic
Board Development & Technical Discussion
Re: BitCrack - A tool for brute-forcing private keys
by
Mikorist
on 29/11/2022, 14:40:32 UTC
I now use the method of

https://github.com/HomelessPhD/BTC32

to generate a random alpha number.


My BTC32_narrow_search.sh
Code:
#!/bin/bash

do
A=$(( $RANDOM % 6 + 3 ))
B=$((RANDOM%8999+1000))
C=$((RANDOM%8999+1000))
D=$((RANDOM%8999+1000))
E=$((RANDOM%8999+1000))
F=$((RANDOM%8999+1000))
G=$((RANDOM%8999+1000))

cat /dev/null > task_file.txt

alpha="0.$A$B$C$D$E$F$G"

line="alpha_to_seek = vpa([$alpha], vpa_acc)"
sed -i '9d' GenerateTask.m

sed -i "9i ${line};" GenerateTask.m

octave --no-line-editing --quiet GenerateTask.m >/dev/null 2>&1


for task_line in $(cat task_file.txt); do
            # Pars fields in "task_file.txt" lines
        bits=`echo $task_line | cut -d ',' -f1`
       alpha=`echo $task_line | cut -d ',' -f2`
    interval=`echo $task_line | cut -d ',' -f3`
     address=`echo $task_line | cut -d ',' -f4`
done

./cuBitCrack -b 100 -t 256 -p 2633 --keyspace "$interval" "$address" --out Lottery.txt



done
Octave or matlab must be installed to be able to generate these space coordinates.