Bitcoin Forum
March 12, 2026, 08:50:21 AM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 [204] 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 639 »
  Print  
Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 373042 times)
albert0bsd
Hero Member
*****
Offline Offline

Activity: 1120
Merit: 718



View Profile
November 27, 2023, 04:43:07 AM
 #4061

The 32 million keys in your solution must be sequential, which means it can't do 32 million arbitrary keys, which is what others thought you meant.

Interesting, yes I thought that it was arbitrary database solution for any random set of public keys, if the "database" need to be sequential you only need to store the starting point (33 bytes) and recalculate all the keys again each time that you need to use them, that is not useful, it is redundant.

Letme guess that he only store one bit per publickey 1 if the key start with 02 and 0 if the key start with 03 something like that.. now that make sense with the calulations it was near only 1 bit per key.
mcdouglasx
Hero Member
*****
Offline Offline

Activity: 938
Merit: 522



View Profile WWW
November 27, 2023, 05:24:14 AM
Last edit: May 01, 2024, 08:36:54 PM by Mr. Big
 #4062

after playing a little with albert0bsd, it is published.
https://bitcointalk.org/index.php?topic=5475626.msg63227343#msg63227343

The 32 million keys in your solution must be sequential, which means it can't do 32 million arbitrary keys, which is what others thought you meant.
Why would you need arbitrary keys? Do you need to go through the entire range?
target= 1000000000
range=1:200000000

Add and subtract random or arbitrary quantities from the target and you get a list of targets.

To these targets you apply a binary sequence of the size you want and you obtain a database distributed in multiple sections of the range.

You can also make jumps in the sequence, every 3 keys or however much you want.




Letme guess that he only store one bit per publickey 1 if the key start with 02 and 0 if the key start with 03 something like that.. now that make sense with the calulations it was near only 1 bit per key.
assumption or incognito mode Grin


you only need to store the starting point (33 bytes) and recalculate all the keys again each time that you need to use them, that is not useful, it is redundant.

that is not how it works.

█████████████████████████
█████████████████████████
███████▀█████████▀███████
█████████████████████████
█████████████████████████
████████████▀████████████
███████▀███████▄███████
███████████▄▄▄███████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████

 2UP.io 
NO KYC
CASINO
██████████████████████████
████████████████████████
███████████████████████
███████████████████
██████████████████████
███████████████████████
███████████████████████
██████████████████
███████████████████████
██████████████████
███████████████████████
████████████████████████
██████████████████████████
███████████████████████████████████████████████████████████████████████████████████████
 
FASTEST-GROWING CRYPTO
CASINO & SPORTSBOOK

 

███████████████████████████████████████████████████████████████████████████████████████
███████████████████████████
█████████████████████████
███████████████████████
███████████████████████
████████████████████████
███████████████████████
███████████████████████
██████████████████████
████████████████████████
███████████████████████
███████████████████████
█████████████████████████
███████████████████████████
 

...PLAY NOW...
WanderingPhilospher
Sr. Member
****
Offline Offline

Activity: 1484
Merit: 285

Shooters Shoot...


View Profile
November 28, 2023, 02:31:02 AM
 #4063

The only promising code I have seen in a long time is the one mc posted,  searching for either 02, or 03 public keys, if it was 02, ignore and discard, if it was 03, generate rmd160 to compare. That's the half of key space.
Promising eh?
But what if it starts with "02"? It's all speculation that it begins with either "03".
So if one gambles whether or not a pub starts with 02 or 03 and eliminates an estimated 50% of the keys; they may gamble wrong and search for infinity finding nada.

You can eliminate as much of the keyspace as you want with a stride; but again, if you don't "guess" the stride correctly, it's all for not.

That code is nothing new, just a different way to gamble.
Also, the biggest part of time, is ate up transforming the priv to pub key. Maybe focus on what stride(s) can give you pubs that start with ""03". That would be a "promising" code.
btc11235
Jr. Member
*
Offline Offline

Activity: 35
Merit: 1


View Profile
November 28, 2023, 05:19:40 PM
 #4064

ok, I'm looking at getting a GPU and trying BitCrack now, but before I do I wanted to know what I can expect...

according to this post (https://bitcointalk.org/index.php?topic=4453897.msg56953547#msg56953547) then if I got an RTX 3090 I'd be looking at roughly ~1800Mh/s...

so, to search the whole range of Puzzle 67 (for example), how long would that take...? because my math says ~1300 years... is that right?
Woz2000
Jr. Member
*
Offline Offline

Activity: 85
Merit: 2


View Profile
November 28, 2023, 08:11:04 PM
 #4065

Almost right.  Grin

0x7ffffffffffffffff - 0x40000000000000000 = 0x3ffffffffffffffff = 73786976294838206463 keys

73786976294838206463 / (1800000000 * 60 * 60 * 24) = 474453 days = 1299 years



ok, I'm looking at getting a GPU and trying BitCrack now, but before I do I wanted to know what I can expect...

according to this post (https://bitcointalk.org/index.php?topic=4453897.msg56953547#msg56953547) then if I got an RTX 3090 I'd be looking at roughly ~1800Mh/s...

so, to search the whole range of Puzzle 67 (for example), how long would that take...? because my math says ~1300 years... is that right?
Unplugged Taste
Newbie
*
Offline Offline

Activity: 18
Merit: 1


View Profile
November 29, 2023, 12:40:34 PM
 #4066


I know exactly what range puzzle number 130 is in. It will reduce the key to be scanned by 50%. I will sell it to anyone who wants to buy it. proof is available. If anyone wants to know the range of PUZZLE 130 UN, I can tell you for money.

No offense, but it has already been identified couple of times. One can reduce the any given point by 50% by subtracting the starting bit point. If we are in the range of 2^129 and 2^130, if we subtract the public key point of 2^129 from the puzzle pubkey, the result is 50% down from the original pubkey. One can then start working on cracking it, and after cracking it, he can easily reach the original pubkey by simply adding 2^129 to it.
WanderingPhilospher
Sr. Member
****
Offline Offline

Activity: 1484
Merit: 285

Shooters Shoot...


View Profile
November 29, 2023, 12:40:41 PM
 #4067


I know exactly what range puzzle number 130 is in. It will reduce the key to be scanned by 50%. I will sell it to anyone who wants to buy it. proof is available. If anyone wants to know the range of PUZZLE 130 UN, I can tell you for money.
Anyone and everyone can easily reduce the range to scan by 50%.

How many leading characters of the range do you claim to know, or is it a general and broad range?
Baskentliia
Jr. Member
*
Offline Offline

Activity: 75
Merit: 1


View Profile
November 29, 2023, 01:22:41 PM
 #4068


I know exactly what range puzzle number 130 is in. It will reduce the key to be scanned by 50%. I will sell it to anyone who wants to buy it. proof is available. If anyone wants to know the range of PUZZLE 130 UN, I can tell you for money.
Anyone and everyone can easily reduce the range to scan by 50%.

How many leading characters of the range do you claim to know, or is it a general and broad range?

Puzzle 130 is either in the range 20-2f or in the range 30-3f. I know this range and I am absolutely sure there is proof. If anyone wants to scan 50% fewer keys, I can tell you. Even though 50% fewer keys are scanned, the scanning range of puzzle 130 is very large.
but increases your Chance by 50%. There is no point in scanning another range unnecessarily.
So I will tell you that puzzle 130 is divided into two parts in the range of 20-3f, the first of these pieces is in the range of 20-2f and the second is in the range of 30-3f. I will tell you which of these ranges you should scan.
mcdouglasx
Hero Member
*****
Offline Offline

Activity: 938
Merit: 522



View Profile WWW
November 29, 2023, 03:11:43 PM
 #4069


I know exactly what range puzzle number 130 is in. It will reduce the key to be scanned by 50%. I will sell it to anyone who wants to buy it. proof is available. If anyone wants to know the range of PUZZLE 130 UN, I can tell you for money.

if you use something like this:


Code:
import secp256k1 as ice

#1361129467683753853853498429727072845823
       #100000000000000000000000000000000

target_public_key = "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"
target = ice.pub2upub(target_public_key)
num = 13611294 # number of times.
sustract= 100000000000000000000000000000000 #amount to subtract each time.
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(num, target, sustract_pub)
for t in range (num+1):
    h= (res[t*65:t*65+65]).hex()
    hc= ice.to_cpub(h)
    data = open("data-base.txt","a")
    data.write(str(hc)+"\n")
    data.close()



one of those pubs is in the range lower than puzzle #107

█████████████████████████
█████████████████████████
███████▀█████████▀███████
█████████████████████████
█████████████████████████
████████████▀████████████
███████▀███████▄███████
███████████▄▄▄███████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████

 2UP.io 
NO KYC
CASINO
██████████████████████████
████████████████████████
███████████████████████
███████████████████
██████████████████████
███████████████████████
███████████████████████
██████████████████
███████████████████████
██████████████████
███████████████████████
████████████████████████
██████████████████████████
███████████████████████████████████████████████████████████████████████████████████████
 
FASTEST-GROWING CRYPTO
CASINO & SPORTSBOOK

 

███████████████████████████████████████████████████████████████████████████████████████
███████████████████████████
█████████████████████████
███████████████████████
███████████████████████
████████████████████████
███████████████████████
███████████████████████
██████████████████████
████████████████████████
███████████████████████
███████████████████████
█████████████████████████
███████████████████████████
 

...PLAY NOW...
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 04, 2023, 02:33:50 AM
Last edit: December 04, 2023, 11:04:17 AM by alek76
 #4070

So this is my attempt at searching key sub-ranges. If you know the key begins with 0x20 then I was searching for "13zb" and keys that printed 0x20-0x3f are noted. I went through various puzzles, some already solved and broke the key ranges down into sub-ranges. Hopefully you will find this useful.

import multiprocessing
import base58
import secrets
from bitcoin import privtopub, pubtoaddr

def vint():
    puzzle_66 = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
    btc = ""

    while btc[:len(puzzle_66)] != puzzle_66:
        alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
        untext = "".join(secrets.choice(alphabet) for i in range (12))
        text = '11111111111111111111111' + 'C' + untext                  #23 1's  'C' is the parameter you can change.
        base58Str = base58.b58decode(text).hex()
        pubKey = privtopub(base58Str)
        btc = pubtoaddr(pubKey)

    f = open("keys.txt", "a")
    f.write(base58Str + "\n")
    f.close()
    b = open("btc.txt", "a")
    b.write(btc + "\n")
    b.close()

    print(base58Str)
    print(pubKey)
    print(btc)

processes = []
for _ in range(1):
    p1 = multiprocessing.Process(target=vint)
    p1.start()
    processes.append(p1)
for process in processes:
    process.join()

LINK to text files with key sub-ranges.
https://drive.google.com/drive/folders/176gIM6ACTyZg5Ux5Adsu-kP5S3LspLcU?usp=drive_link

I don't know python, but I found a bug.
The range is not correct, but that's half the problem.
Will it save keys.txt ? base58Str is declared local?
It will be right, who knows?
Code:
import multiprocessing
import base58
import secrets
from bitcoin import * # from bitcoin import privtopub, pubtoaddr

def vint():
    puzzle_66 = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
    btc = ""
    base58Str = "" # ?
    pubKey = "" # ?

    while btc != puzzle_66: #while btc[:len(puzzle_66)] != puzzle_66:
        alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
        untext = "".join(secrets.choice(alphabet) for i in range (11))
        #text = '11111111111111111111111' + 'C' + untext                  #23 1's  'C' is the parameter you can change.
        text =  '11111111111111111111111' + '3' + untext
        base58Str = base58.b58decode(text).hex()
        pubKey = privtopub(base58Str)
        pubKey = encode_pubkey(pubKey, 'hex_compressed') # !!!!!!!! ADD THE !!!!!!!!
        btc = pubtoaddr(pubKey)
        #print (base58Str)
        #print (btc)
        #print (btc[:len(puzzle_66)])
        print (pubKey)
    
    f = open("keys.txt", "a")
    f.write(base58Str + "\n")
    f.close()
    b = open("btc.txt", "a")
    b.write(btc + "\n")
    b.close()

    print(base58Str)
    print(pubKey)
    print(btc)


if __name__ == '__main__':
    
    th = 2
    processes = []
    for _ in range(th):
        p1 = multiprocessing.Process(target=vint)
        p1.start()
        processes.append(p1)
        print ('Start thread: ', _)
    for process in processes:
        process.join()
    
Roll Eyes Try replacing the != condition with == In the first script
And error 3 - the public key is not compressed.
Who writes them here on purpose, right?
Corrected. To check, I edited the script for bit 28. The adjusted script works. I haven't checked the speed, need to add a counter. ~2 Kkeys/s
rosengold
Jr. Member
*
Offline Offline

Activity: 150
Merit: 7


View Profile
December 04, 2023, 12:42:27 PM
Merited by alek76 (1)
 #4071

This is my Contribution to Challenge:

https://github.com/yago5656/moonwalker

All the logic lies on clock.cu

Code:
#include <cuda.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <stdint.h>

#include <curand.h>
#include <curand_kernel.h>
#include <math.h>
#include <assert.h>

   
#include "Vanity.h"
#include "Base58.h"
#include "Bech32.h"
#include "hash/sha256.h"
#include "hash/sha512.h"
#include "IntGroup.h"
#include "Wildcard.h"
#include "Timer.h"
#include "hash/ripemd160.h"
#include <algorithm>
#include <vector>
#include "SECP256K1.cpp"

#include "GPUGroup.h"
#include "GPUMath.h"
#include "GPUHash.h"
#include "GPUBase58.h"
#include "GPUWildcard.h"
#include "GPUCompute.h"
#include "GPUEngine.h"
 
#define BLOCKS 256
#define THREADS_PER_BLOCK 256
     


__device__ unsigned long long int totThr2 = 0;

__global__ void keyFinderKernel(uint8_t* gTableXCPU, uint8_t* gTableYCPU)
{

//we use atomicadd to verify how many threads are alive, this number is used to define the starting and end ranges for each thread   
atomicAdd(&totThr2, 1);

   //how many threads ?
    __int128_t index = blockIdx.x * blockDim.x + threadIdx.x;
   
//initial definitions, change your search ranges here. here we are searching for #20
    __int128_t start = 0xD0000;
    __int128_t end =   0xDFFFF;
    __int128_t range =  end - start;
    __int128_t rangeend;
    __int128_t rangestart;

     //calculate the range for each thread
     rangeend =  (((range / (totThr2 * 1)) * (index + 1)) + start);
     rangestart = (((range / (totThr2 * 1)) * index) + start);

 
//some hashes to search, comment the actual line and uncomment the hash you need to search, don't forget to change start and end ranges above. in this case whe are searching for #20

//     uint8_t aa[20] = { 0x95, 0xa1, 0x56, 0xcd, 0x21, 0xb4, 0xa6, 0x9d, 0xe9, 0x69, 0xeb, 0x67, 0x16, 0x86, 0x4f, 0x4c, 0x8b, 0x82, 0xa8, 0x2a }; //address HASH160 40 bit
//   uint8_t aa[20] = { 0x68, 0x13, 0x3e, 0x19, 0xb2, 0xdf, 0xb9, 0x03, 0x4e, 0xdf, 0x98, 0x30, 0xa2, 0x00, 0xcf, 0xdf, 0x38, 0xc9, 0x0c, 0xbd }; //address HASH160 61 bit
 //  uint8_t aa[20] = { 0x9a, 0x01, 0x22, 0x60, 0xd0, 0x1c, 0x51, 0x13, 0xdf, 0x66, 0xc8, 0xa8, 0x43, 0x8c, 0x9f, 0x7a, 0x1e, 0x3d, 0x5d, 0xac }; //address HASH160 46 bit
 //  uint8_t aa[20] = { 0x36, 0xaf, 0x65, 0x9e, 0xdb, 0xe9, 0x44, 0x53, 0xf6, 0x34, 0x4e, 0x92, 0x0d, 0x14, 0x3f, 0x17, 0x78, 0x65, 0x3a, 0xe7 }; //address HASH160 52 bit   
//   uint8_t aa[20] = { 0xf0, 0x22, 0x5b, 0xfc, 0x68, 0xa6, 0xe1, 0x7e, 0x87, 0xcd, 0x8b, 0x5e, 0x60, 0xae, 0x3b, 0xe1, 0x8f, 0x12, 0x07, 0x53 }; //address HASH160 45 bit   
//   uint8_t aa[20] = { 0xd1, 0x56, 0x2e, 0xb3, 0x73, 0x57, 0xf9, 0xe6, 0xfc, 0x41, 0xcb, 0x23, 0x59, 0xf4, 0xd3, 0xed, 0xa4, 0x03, 0x23, 0x29 }; //address HASH160 41 bit
//   uint8_t aa[20] = { 0xf6, 0xd6, 0x7d, 0x79, 0x83, 0xbf, 0x70, 0x45, 0x0f, 0x29, 0x5c, 0x9c, 0xb8, 0x28, 0xda, 0xab, 0x26, 0x5f, 0x1b, 0xfa }; //address HASH160 35 bit
//   uint8_t aa[20] = { 0xd3, 0x9c, 0x47, 0x04, 0x66, 0x4e, 0x1d, 0xeb, 0x76, 0xc9, 0x33, 0x1e, 0x63, 0x75, 0x64, 0xc2, 0x57, 0xd6, 0x8a, 0x08 }; //address HASH160 30 bit

    uint8_t aa[20] = { 0xb9, 0x07, 0xc3, 0xa2, 0xa3, 0xb2, 0x77, 0x89, 0xdf, 0xb5, 0x09, 0xb7, 0x30, 0xdd, 0x47, 0x70, 0x3c, 0x27, 0x28, 0x68 }; //address HASH160 20 bit

//   uint8_t aa[20] = { 0x20, 0xd4, 0x5a, 0x6a, 0x76, 0x25, 0x35, 0x70, 0x0c, 0xe9, 0xe0, 0xb2, 0x16, 0xe3, 0x19, 0x94, 0x33, 0x5d, 0xb8, 0xa5 }; //address HASH160 66 bit
//   uint8_t aa[20] = { 0x73, 0x94, 0x37, 0xbb, 0x3d, 0xd6, 0xd1, 0x98, 0x3e, 0x66, 0x62, 0x9c, 0x5f, 0x08, 0xc7, 0x0e, 0x52, 0x76, 0x93, 0x71 }; //address HASH160 67 bit
//   uint8_t aa[20] = { 0xe0, 0xb8, 0xa2, 0xba, 0xee, 0x1b, 0x77, 0xfc, 0x70, 0x34, 0x55, 0xf3, 0x9d, 0x51, 0x47, 0x74, 0x51, 0xfc, 0x8c, 0xfc }; //address HASH160 68 bit
//   uint8_t aa[20] = { 0x95, 0xa1, 0x56, 0xcd, 0x21, 0xb4, 0xa6, 0x9d, 0xe9, 0x69, 0xeb, 0x67, 0x16, 0x86, 0x4f, 0x4c, 0x8b, 0x82, 0xa8, 0x2a }; //address HASH160 40 bit
// uint8_t aa[20] = { 0x52, 0xe7, 0x63, 0xa7, 0xdd, 0xc1, 0xaa, 0x4f, 0xa8, 0x11, 0x57, 0x8c, 0x49, 0x1c, 0x1b, 0xc7, 0xfd, 0x57, 0x01, 0x37 }; //address HASH160 65 bit


//we will take and compare only the last 8 bytes of hash160

    uint64_t hash160Last8Bytesa;
    uint64_t hash160Last8Bytesb;
    uint64_t hash160Last8Bytesb2;
    uint64_t hash160Last8Bytesb3;
 
    GET_HASH_LAST_8_BYTES(hash160Last8Bytesa, aa);

uint64_t x,y,x1,y1,x2,y2;

//the loop, we will test 3 variations of the key (x, x+1, x-1)
while (true) {
    __int128_t ii;

    for (ii = rangestart; ii < rangeend; ii++) {

  uint64_t  qx[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };
  uint64_t  qy[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };

  uint64_t   qx2[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };
  uint64_t   qy2[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };
 
  uint64_t  qx3[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };
  uint64_t   qy3[4]= { 0x000000000000000, 0x000000000000000,0x000000000000000,0x000000000000000 };

//empty the actual hash160 bytes
    uint64_t hash160Last8Bytesb = 0;
    uint64_t hash160Last8Bytesb2 = 0;
    uint64_t hash160Last8Bytesb3 = 0;

//we take the 128 bit integer and split it in two 64 bit numbers to work with uint64 array
y = static_cast<uint64_t>(ii >> 64);
x = static_cast<uint64_t>(ii);

y1 = y;
x1 = x + 1;

y2 = y;
x2 = x - 1;

          //the priv keys
          uint64_t curi1[4] = { x, y, 0x000000000000000, 0x000000000000000 };
          uint64_t curi2[4] = { x1, y1, 0x000000000000000, 0x000000000000000 };
          uint64_t curi3[4] = { x2, y2, 0x000000000000000, 0x000000000000000 };

            //we take the array and turn into uint16 to work with point multiplication
            uint16_t* pv = (uint16_t*)(&curi1);
            uint16_t* pv1 = (uint16_t*)(&curi2);
            uint16_t* pv2 = (uint16_t*)(&curi3);

//point multiplication, we take the integer and multiply by G
            _PointMultiSecp256k1(qx, qy, pv, gTableXCPU, gTableYCPU);
            _PointMultiSecp256k1(qx2, qy2, pv1, gTableXCPU, gTableYCPU);
            _PointMultiSecp256k1(qx3, qy3, pv2, gTableXCPU, gTableYCPU);

uint8_t hash160[SIZE_HASH160];
            uint8_t hash1602[SIZE_HASH160];
            uint8_t hash1603[SIZE_HASH160];

//is Y odd or even ?
int qy0x = 0;
if (qy[0] % 2) { qy0x = 1; };

int qy1x = 0;
if (qy2[0] % 2) { qy1x = 1; };

int qy2x = 0;
if (qy3[0] % 2) { qy2x = 1; };

            //we take the result and calculate hash160
            _GetHash160Comp(qx, (uint8_t)(qy0x), hash160);
            _GetHash160Comp(qx2, (uint8_t)(qy1x), hash1602);
            _GetHash160Comp(qx3, (uint8_t)(qy2x), hash1603);

            //last 8 bytes
            GET_HASH_LAST_8_BYTES(hash160Last8Bytesb, hash160);
            GET_HASH_LAST_8_BYTES(hash160Last8Bytesb2, hash1602);
            GET_HASH_LAST_8_BYTES(hash160Last8Bytesb3, hash1603);

            //and finally we compare with our hash160, if found the program stops

            if (hash160Last8Bytesb == hash160Last8Bytesa) {
                uint64_t xx;
                char foo[20];
                printf("FOUND PRIVKEY 0x%" PRIx64 " 0x%" PRIx64 " 0x % " PRIx64 " \n", (uint64_t)curi1[2], (uint64_t)curi1[1], (uint64_t)curi1[0]);
                asm("trap;");
            }

            if (hash160Last8Bytesb2 == hash160Last8Bytesa) {
                uint64_t xx;
                char foo[20];
                printf("FOUND PRIVKEY 0x%" PRIx64 " 0x%" PRIx64 " 0x % " PRIx64 " \n", (uint64_t)curi2[2], (uint64_t)curi2[1], (uint64_t)curi2[0]);
                asm("trap;");
            }

            if (hash160Last8Bytesb3 == hash160Last8Bytesa) {
                uint64_t xx;
                char foo[20];
                printf("FOUND PRIVKEY 0x%" PRIx64 " 0x%" PRIx64 " 0x % " PRIx64 " \n", (uint64_t)curi3[2], (uint64_t)curi3[1], (uint64_t)curi3[0]);
                asm("trap;");
            }


    }
}
            }

#define NUM_GTABLE_CHUNK 16    // Number of GTable chunks that are pre-computed and stored in global memory
#define NUM_GTABLE_VALUE 65536 // Number of GTable values per chunk (all possible states) (2 ^ NUM_GTABLE_CHUNK)
#define SIZE_GTABLE_POINT 32   // Each Point in GTable consists of two 32-byte coordinates (X and Y)
#define COUNT_GTABLE_POINTS (NUM_GTABLE_CHUNK * NUM_GTABLE_VALUE)

void loadGTable(uint8_t* gTableX, uint8_t* gTableY) {
    std::cout << "loadGTable started" << std::endl;
   
    Secp256K1 *secp = new Secp256K1();
    secp->Init2();
   
    for (int i = 0; i < NUM_GTABLE_CHUNK; i++)
    {
        for (int j = 0; j < NUM_GTABLE_VALUE - 1; j++)
        {
            int element = (i * NUM_GTABLE_VALUE) + j;
            Point p = secp->GTable2[element];
            for (int b = 0; b < 32; b++) {
                gTableX[(element * SIZE_GTABLE_POINT) + b] = p.x.GetByte64(b);
                gTableY[(element * SIZE_GTABLE_POINT) + b] = p.y.GetByte64(b);
            }
        }
    }

    std::cout << "loadGTable finished!" << std::endl;
}
int main()
{
    printf("MoonWalker YABF v0.2 beta\n");
  curandState *d_state;
  cudaMalloc(&d_state, sizeof(curandState));

    uint8_t* gTableXCPU = new uint8_t[COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT];
    uint8_t* gTableYCPU = new uint8_t[COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT];
    uint8_t* gTableXGPU;
    uint8_t* gTableYGPU;
    loadGTable(gTableXCPU, gTableYCPU);


   printf("Allocating gTableX \n");
   
    cudaMalloc((void**)&gTableXGPU, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT);
    cudaMemset(gTableXGPU, 0, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT);
    cudaMemcpy(gTableXGPU, gTableXCPU, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT, cudaMemcpyHostToDevice);
    printf("Allocating gTableY \n");
    cudaMalloc((void**)&gTableYGPU, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT);
    cudaMemset(gTableYGPU, 0, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT);
    cudaMemcpy(gTableYGPU, gTableYCPU, COUNT_GTABLE_POINTS * SIZE_GTABLE_POINT, cudaMemcpyHostToDevice);

     printf("Go ! \n");

    keyFinderKernel << <BLOCKS, THREADS_PER_BLOCK >> > (gTableXGPU, gTableYGPU);

cudaError_t errSync  = cudaGetLastError();
cudaError_t errAsync = cudaDeviceSynchronize();
if (errSync != cudaSuccess)
  printf("Sync kernel error: %s\n", cudaGetErrorString(errSync));
if (errAsync != cudaSuccess)
  printf("Async kernel error: %s\n", cudaGetErrorString(errAsync));

}


expected result (testing with #20)

Code:
MoonWalker YABF v0.2 beta
loadGTable started
loadGTable finished!
Allocating gTableX
Allocating gTableY
Go !
FOUND PRIVKEY 0x0 0x0 0x d2c55


As you see this is a dirty script to understand and use CUDA to search the solution, you can start using this as your starting point to build more complex CUDA solvers !

actually this script is slow ! I need some help from community to speed up and fix some probable wrong points

PS: Don't use it on Visual Studio, it will not work ! this mod is for linux only (CUDA 12.2)

just change clock.cu as you want and:

Code:
make

and then

Code:
./clock 

to run

let's get ahead, cheers  Cool
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 04, 2023, 11:56:13 PM
Last edit: December 05, 2023, 12:46:04 AM by alek76
 #4072

All the logic lies on clock.cu
Remove int qy0x, ... int qy2x
Code:
//is Y odd or even ?
//int qy0x = 0;
//if (qy[0] % 2) { qy0x = 1; };

//int qy1x = 0;
//if (qy2[0] % 2) { qy1x = 1; };

//int qy2x = 0;
//if (qy3[0] % 2) { qy2x = 1; };

            //we take the result and calculate hash160
            // changes 1
            // uint8_t isOdd = (uint8_t)(py[0] & 1) // bit operations are enclosed in parentheses
            _GetHash160Comp(qx, (uint8_t)(qy[0] & 1), hash160);// _GetHash160Comp(qx, (uint8_t)(qy0x), hash160);
            _GetHash160Comp(qx2, (uint8_t)(qy2[0] & 1), hash1602);// _GetHash160Comp(qx2, (uint8_t)(qy1x), hash1602);
            _GetHash160Comp(qx3, (uint8_t)(qy3[0] & 1), hash1603);// _GetHash160Comp(qx3, (uint8_t)(qy2x), hash1603);


Cuda Secp256k1 Point Multiplication - Takes 32-byte privKey.
And if more than 32 bits ? This function needs to be redone. But for this you need 2 more functions. Adding points and duplicating points are not the same thing.
It will be slow too. It’s better to put ready-made points into the kernel and let them spin there in a loop until hash160 matches. In Atomic, add the x coordinate if hash160 matches. It takes a lot of time to load and unload the kernel.
rosengold
Jr. Member
*
Offline Offline

Activity: 150
Merit: 7


View Profile
December 05, 2023, 12:21:26 AM
 #4073


And if more than 32 bits ? This function needs to be redone. But for this you need 2 more functions. Adding points and duplicating points are not the same thing.


all you need is point multiplication function that includes point add already on script.

this script actually can brute force any puzzle until 128 bits, the 32 BYTE privkey is only to work with point multiplication function, that is NOT 32 Bit puzzle. very different things.

The logic of script is:

walk from start to end, take the actual number as private key (in this case from 1 bit to 128 bit number) and multiply by G from Gtable to get the pubkey (x,y) and then the hash160.
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 05, 2023, 06:56:55 AM
 #4074

...
I looked briefly) You can add an initial random for points.
There is an accelerated version of GPUMath.h. Where the value _0[] _1[] _P[] from __constant__ memory is not used. MM64 is declared define - #define MM64 0xD838091DD2253531ULL. The modulo inversion function is also faster.
DegenHero
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
December 05, 2023, 07:40:55 AM
 #4075

And error 3 - the public key is not compressed.

Just curious, how can I make transaction with uncompressed address?
Is there a wallet that handle uncompressed address as well as compressed one?
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 05, 2023, 09:27:21 AM
 #4076

Just curious, how can I make transaction with uncompressed address?
Is there a wallet that handle uncompressed address as well as compressed one?
Exactly the same Smiley Public non-compressed ones have not been used for a long time. The key is the same, the format is different and the addresses are different. Any program will process the transaction. This is not related to the topic.
rosengold
Jr. Member
*
Offline Offline

Activity: 150
Merit: 7


View Profile
December 05, 2023, 10:01:37 AM
 #4077

...
I looked briefly) You can add an initial random for points.
There is an accelerated version of GPUMath.h. Where the value _0[] _1[] _P[] from __constant__ memory is not used. MM64 is declared define - #define MM64 0xD838091DD2253531ULL. The modulo inversion function is also faster.


good point, do you have this accelerated version of GPUMath.h ?
would be awesome if anyone have already this random function for this cuda script, it's not too easy make it using pure cuda
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 05, 2023, 12:04:55 PM
 #4078

good point, do you have this accelerated version of GPUMath.h ?
updated 3 years ago) Your code contains an old version. Compare code. Sometimes you can look into the file)
ModInv update + refurbishment
https://github.com/JeanLucPons/VanitySearch/blob/master/GPU/GPUMath.h
rosengold
Jr. Member
*
Offline Offline

Activity: 150
Merit: 7


View Profile
December 05, 2023, 12:06:23 PM
 #4079

good point, do you have this accelerated version of GPUMath.h ?
updated 3 years ago) Your code contains an old version. Compare code. Sometimes you can look into the file)
ModInv update + refurbishment
https://github.com/JeanLucPons/VanitySearch/blob/master/GPU/GPUMath.h

thanks, my script is still in development
alek76
Member
**
Offline Offline

Activity: 93
Merit: 16


View Profile
December 06, 2023, 04:31:51 AM
 #4080

Key Maker for 100 thousand addresses. Saves everything in files keys - addresses, and in another file X coordinate. To build you need to first build OpenSSL. This program is 32 bit.
https://github.com/alek76-2/50BTCKeyMaker
OutKeys.txt:
Code:
1443055276A7E82809D3E6A908BF7526FB1117F982B80ECFA63C69D55521D420
13KV6Z8vFfLb2CTe5AVCtgED3LsUrcw7H4
1Bkv3sr5gbyWqBoTBRHQZ2T9tmmRugxi5Y
3GVGg5M8W1QLeCJmCZT1329XiSQ34oRFke
D442ECB8C5586A74BF5D759A7461C829BEC147A7F12C6471435D7DFCAFF397B0
16DjFiGAo5QDsP6CALUfnYRAbH3pGHMKsT
1PRrbzwby5HBw9fWzSiNRVkug5GMiq58q3
3FgrzeQf2wWLm6icnQUQVAi3NAAUS843qd
0D7428579AA850FB8D9C0A6DFE2937AAD69B8C82698E67EFF37ABB835E0849CF
1L86hRDF4JYKFqh29chG6GEYQ1P1dPYzwu
1BcjcHaghdaNER3YMXzBFhPfeZrKEnQLQq
34GwRv3Tdn76SkdJCnZpVnKy5RZPXu5TxQ
1C2CCAF7CE9D7CAAF35D56B6AE24413F00B61E47A238A92591B22516EB1090D5
13JZKYbcLsqBRfcqVHLBgfkoM8ua3bFQck
1AJLoZGPK9h6Wiz6jK1EJU8VJ4hHA74gaR
31tVk4AUuuXuonYBpFjLuWJ5PndWwqLuJk
2F159321E656202AA6D615F8350E150FBE8E8386097305D57CA3824BBFAA95B2
1LBzzam2ARkfs5Uk1169taTcGDA9FGGXLi
1Np75PFcPD2ZEfpH6CGWvpJysUg3zC343j
33FpvbYDHszEupihAdewpY6Tooxpa1bYus
You can save 10 MKeys to a file, change the multiplier. If you have nothing to do, you can compare with other addresses and make sure that they never match Smiley
Pages: « 1 ... 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 [204] 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 ... 639 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!