Search content
Sort by

Showing 20 of 139 results by rosengold
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 25/01/2024, 08:47:39 UTC
share with us sir


I can share puzzle search app in Rust. I'm sick of code in Python. Grin

main.rs
Code:
extern crate bitcoin;
extern crate rand;
extern crate reqwest;
extern crate secp256k1;
extern crate num_cpus;
extern crate thousands;
extern crate threadpool;
extern crate chrono;

use bitcoin::network::Network;
use bitcoin::address::Address;
use bitcoin::key::PrivateKey;
use rand::Rng;
use std::env;
use std::fs::File;
use std::io::Write;
use std::sync::{Arc, Mutex};
use threadpool::ThreadPool;
use chrono::Local;

const TARGET: &str = "1QCbW9HWnwQWiQqVo5exhAnmfqKRrCRsvW";

fn main() {
    // Print the current time when the script starts
    let current_time = Local::now();
    println!("[+] Puzzle search\n[+] Script started at: {}", current_time);

    let args: Vec<String> = env::args().collect();
    let num_threads = if args.len() < 2 {
        num_cpus::get() as u32
    } else {
        args[1].parse().expect("Failed to parse number of threads")
    };

    let begin: u128 = 16383;
    let end: u128 = 32767;

    println!(
        "[+] concurrency:{}\n[+] from:{} to:{}\n[+] target:{}",
        num_threads,
        begin,
        end,
        TARGET
    );

    let found_flag = Arc::new(Mutex::new(false));
    let pool = ThreadPool::new(num_threads.try_into().unwrap());

    for _ in 0..num_threads {
        let pool = pool.clone();
        let found_flag = found_flag.clone();
        pool.execute(move || {
            let mut rng = rand::thread_rng();
            random_lookfor(rng.gen_range(begin..end), end, found_flag);
        });
    }

    pool.join();
}

fn random_lookfor(begin: u128, end: u128, found_flag: Arc<Mutex<bool>>) {
    let secp = bitcoin::secp256k1::Secp256k1::new();

    loop {
        let value: u128 = rand::thread_rng().gen_range(begin..end);
        let private_key_hex = format!("{:0>64x}", value);
        let private_key_bytes = hex::decode(&private_key_hex).expect("Failed to decode private key hex");

        let private_key: PrivateKey = PrivateKey {
            compressed: true,
            network: Network::Bitcoin,
            inner: bitcoin::secp256k1::SecretKey::from_slice(&private_key_bytes).unwrap(),
        };

        let public_key = private_key.public_key(&secp);
        let address = Address::p2pkh(&public_key, Network::Bitcoin).to_string();
        print!(
            "\r[+] WIF: {}",
            private_key
        );

        // Check if a match has been found by another thread
        let mut found_flag = found_flag.lock().unwrap();
        if *found_flag {
            break;
        }

        if address == TARGET {
            let current_time = Local::now();
            let line_of_dashes = "-".repeat(80);
            println!(
                "\n[+] {}\n[+] KEY FOUND! {}\n[+] decimal: {} \n[+] private key: {} \n[+] public key: {} \n[+] address: {}\n[+] {}",
                line_of_dashes,
                current_time,
                value,
                private_key,
                public_key,
                address,
                line_of_dashes          
            );

            // Set the flag to true to signal other threads to exit
            *found_flag = true;

            if let Ok(mut file) = File::create("KEYFOUNDKEYFOUND.txt") {
                let line_of_dashes = "-".repeat(130);
                writeln!(
                    &mut file,
                "\n{}\nKEY FOUND! {}\ndecimal: {} \nprivate key: {} \npublic key: {} \naddress: {}\n{}",
                line_of_dashes,
                current_time,
                value,
                private_key,
                public_key,
                address,
                line_of_dashes      
                )
                .expect("Failed to write to file");
            } else {
                eprintln!("Error: Failed to create or write to KEYFOUNDKEYFOUND.txt");
            }
            break;
        }
    }
}

Cargo.toml
Code:
[package]
name = "puzzle"
version = "0.1.0"
edition = "2021"

[dependencies]
threadpool = "1.8.0"
bitcoin_hashes = "0.13.0"                
bitcoin = "0.31.1"
hex = "0.4.3"
rand = "0.8.5"
reqwest = "0.11.23"
secp256k1 = "0.28.1"
num_cpus = "1.16.0"
thousands = "0.2.0"
chrono = "0.4"

  • --------------------------------------------------------------------------------
  • KEY FOUND!
  • decimal: 26867
  • private key: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFY5iMZbuRxj
  • public key: 02fea58ffcf49566f6e9e9350cf5bca2861312f422966e8db16094beb14dc3df2c
  • address: 1QCbW9HWnwQWiQqVo5exhAnmfqKRrCRsvW
  • --------------------------------------------------------------------------------

Install Rust:
Code:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Configure Rust Environment:
Code:
source $HOME/.cargo/env

Code:
export PATH="$HOME/.cargo/bin:$PATH"

Create a Puzzle Rust Project:
Code:
cargo new puzzle

copy/paste above main.rs & Cargo.toml

Code:
cd  puzzle

Build program
Code:
cargo build --release

Start
Code:
cargo run

or directly as a bin application
Code:
./target/release/puzzle

p.s.
You can remove :      
Code:
       print!(
            "\r[+] WIF: {}",
            private_key
        );

for more speed....

I have similar levels of performance in Rust and C. But much less bugs in Rust  Wink

amazing, thanks.

I will study your code and implement some own logic of mine.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 21/01/2024, 17:22:17 UTC
Post
Topic
Board Português (Portuguese)
Re: Voce já verificou se possui algum satoshi raro em seus endereços?
by
rosengold
on 11/01/2024, 20:20:21 UTC
fiquei fascinado com esse assunto, acho que tem um belo potencial no futuro.

o site do ordinals tem uma area pra encontrar satoshis raros tbm

https://ordiscan.com/address/1TUMBLRXHDjFZacmFLbuDn2Rw1rcPgacR/rare-sats

nao duvido que ja tem gente pensando em meios de minerar esses satoshis raros  Roll Eyes
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 10/01/2024, 03:31:30 UTC

In the meantime I rewrite the GPUHash.h file
GPU constant memory is not used in hash functions. I checked the program's operation on PK 40 bit. It works, but the speed is the same.
https://github.com/alek76-2/VanitySearch/blob/main/mod/other_files/GPUHash_nc.h

Can someone test it?

nice work alek !

could you please add a stride function on it ?
Post
Topic
Board Bitcoin Discussion
Merits 1 from 1 user
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 21/12/2023, 23:55:04 UTC
⭐ Merited by alek76 (1)
Just crack the puzzle then and stop talking ... It starts to be annoying that more and more people here shows weird ideas but in fact they know nothing.

agreed. this topic became a land of crazy logics that are just waste of time. to find #66 you need an optimized script with CUDA and enought computing power, everything besides this are just vaporware.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 05/12/2023, 12:06:23 UTC
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, still in development
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 05/12/2023, 10:01:37 UTC
...
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
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 05/12/2023, 00:21:26 UTC

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.
Post
Topic
Board Bitcoin Discussion
Merits 1 from 1 user
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 04/12/2023, 12:42:27 UTC
⭐ Merited by alek76 (1)
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
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 23/11/2023, 14:09:12 UTC

awesome ! I have some cuda functions for Point add and Point Mult, and a basic script working but I need to fix it, sometimes it works and sometimes not... Huh
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 23/11/2023, 11:19:05 UTC
...

it would be awesome if there's a CUDA version for it.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 25/10/2023, 17:47:36 UTC

Code:
#include <iostream>
#include <vector>...

  • Bytea HASH160 Search by NoMachine
  • Sat Oct 21 10:39:23 2023
  • Puzzle: 15
  • Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
  • PUZZLE SOLVED: 2023-10-21 10:39:24
  • Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000
Hi @nomachine

how to make it work sequential instead of random ?


Amazing thanks

here you go,  buddy

Code:
#include <iostream>
#include <vector>
#include <iomanip>
#include <openssl/bn.h>
#include <openssl/ec.h>
#include <openssl/obj_mac.h>
#include <openssl/sha.h>
#include <openssl/evp.h>
#include <openssl/ripemd.h>
#include <ctime>
#include <sstream>
#include <fstream>

// Function to convert a byte vector to a hexadecimal string
std::string bytesToHex(const std::vector<unsigned char>& bytes) {
    std::stringstream ss;
    for (unsigned char byte : bytes) {
        ss << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte);
    }
    return ss.str();
}

// Function to calculate the RIPEMD160 hash of a byte vector
std::vector<unsigned char> calculateRIPEMD160(const std::vector<unsigned char>& data) {
    std::vector<unsigned char> hash(RIPEMD160_DIGEST_LENGTH);
    RIPEMD160(data.data(), data.size(), hash.data());
    return hash;
}

int main() {
    // Initialize the OpenSSL library
    if (OpenSSL_add_all_algorithms() != 1) {
        std::cerr << "OpenSSL initialization failed." << std::endl;
        return 1;
    }

    // Define the range
    std::string start_range_hex = "000000000000000000000000000000000000000000000001ffffffffffffffff";
    std::string end_range_hex = "000000000000000000000000000000000000000000000003ffffffffffffffff";
    // Set the target Hash160 value (replace with your target hash)
    std::string target_hash160_hex = "20d45a6a762535700ce9e0b216e31994335db8a5";

    // Create an EC_KEY object
    EC_KEY* ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);

    // Calculate the SHA-256 hash of the public key
    unsigned char sha256_result[SHA256_DIGEST_LENGTH];

    // Calculate the RIPEMD160 hash of the SHA-256 hash
    std::vector<unsigned char> ripemd160_result(RIPEMD160_DIGEST_LENGTH);

    BIGNUM* start_range = BN_new();
    BIGNUM* end_range = BN_new();
    BN_hex2bn(&start_range, start_range_hex.c_str());
    BN_hex2bn(&end_range, end_range_hex.c_str());

    while (BN_cmp(start_range, end_range) <= 0) {
        // Create a BIGNUM from the current value in the range
        BIGNUM* bn_private_key = BN_dup(start_range);

        // Set the private key in the EC_KEY object
        EC_KEY_set_private_key(ec_key, bn_private_key);

        // Compute the public key from the private key
        EC_POINT* public_key_point = EC_POINT_new(EC_KEY_get0_group(ec_key));
        EC_POINT_mul(EC_KEY_get0_group(ec_key), public_key_point, bn_private_key, NULL, NULL, NULL);

        // Convert the public key point to binary representation (compressed)
        size_t public_key_length = EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, NULL, 0, NULL);
        std::vector<unsigned char> public_key_bytes(public_key_length);
        EC_POINT_point2oct(EC_KEY_get0_group(ec_key), public_key_point, POINT_CONVERSION_COMPRESSED, public_key_bytes.data(), public_key_length, NULL);

        SHA256(public_key_bytes.data(), public_key_bytes.size(), sha256_result);
        ripemd160_result = calculateRIPEMD160(std::vector<unsigned char>(sha256_result, sha256_result + SHA256_DIGEST_LENGTH));

        // Convert the calculated RIPEMD160 hash to a hexadecimal string
        std::string calculated_hash160_hex = bytesToHex(ripemd160_result);

        // Display the generated public key hash (Hash160) and private key
        std::string message = "\r\033[01;33m[+] Public Key Hash (Hash 160): " + calculated_hash160_hex;
        std::cout << message << "\e[?25l";
        std::cout.flush();

        // Check if the generated public key hash matches the target
        if (calculated_hash160_hex == target_hash160_hex) {
            // Get the current time
            std::time_t currentTime;
            std::time(&currentTime);
            std::tm tmStruct = *std::localtime(&currentTime);

            // Format the current time into a human-readable string
            std::stringstream timeStringStream;
            timeStringStream << std::put_time(&tmStruct, "%Y-%m-%d %H:%M:%S");
            std::string formattedTime = timeStringStream.str();

            std::cout << "\n\033[32m[+] PUZZLE SOLVED: " << formattedTime << "\033[0m" << std::endl;
            std::cout << "\r\033[32m[+] Target Public Key Hash (Hash160) found! Private Key: " << BN_bn2hex(bn_private_key) << std::endl;

            // Append the private key information to a file if it matches
            std::ofstream file("KEYFOUNDKEYFOUND.txt", std::ios::app);
            if (file.is_open()) {
                file << "\nPUZZLE SOLVED " << formattedTime;
                file << "\nPrivate Key (hex): " << BN_bn2hex(bn_private_key);
                file << "\n--------------------------------------------------------------------------------------------------------------------------------------------";
                file.close();
            }

            BN_free(bn_private_key);
            break;
        }

        // Increment the current value in the range
        BN_add_word(start_range, 1);
    }

    // Free the EC_KEY and BIGNUM objects
    BN_free(start_range);
    BN_free(end_range);
    EC_KEY_free(ec_key);

    return 0;
}

Code:
g++ -m64 -march=native -pthread -O3 -I. -o puzzle66 puzzle.cpp -lssl -lcrypto -ldl


Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 25/10/2023, 15:46:47 UTC
Hi friends, after a few months of trying I have found what is definitely the key to this puzzle. I am not a professional programmer or math teacher.
I am a graphic designer and through the drawing of figures and maps, I reached a place where the relationship of these numbers and how they support each other through the 4 main mathematical operations (* + - /) is clearly visible.
Numbers have a strange order and order in chaos! I don't know what to call it
  In this order, you can see outputs that are a few numbers of private keys, mostly the first 3 digits
My shape and drawing is animated and with each key it has its own shape, but with all its changes, the connection and order of the numbers is not lost.
  I have a triangle which, by changing its size and moving in the range and even rotating from 0 to 360 degrees, displays the three sides of a single number or the sum of the other two sides.
We all know that the shapes are some kind of mathematical formulas, and this means that there is an algorithm, only a formula has not been written for it.
My friends, I need a programmer to program my shapes and actions so that the key is fully calculated.
Because the keys are related to each other from any direction, angle and distance. It was not without reason that the creator revealed the public keys in 5 steps.
Anyway, after a few years of heavy problems, I have now reached a point where I need to trust someone again. Now there is a possibility that this trust will destroy my life like in the past, but there is no other way.
Friends, I only work with an experienced programmer. Someone who has a portfolio on GitHub. Because there is nothing that can be told to a few people.
The next thing is that this algorithm is definitely correct, and the programmer and I should collect a maximum of 20 bits so that the rights of those who are trying and working on this puzzle are not lost and they can reach the keys in their own way. All this money is not for us.

My email is amir.k3nt@gmail.com

I used Google translation, so I apologize if there is a mistake.

Interesting, I have built my own searcher to find it,

If you share the correct first 3 characters of #66 I'm ready to share 50/50 with you, I have all CUDA scripts to find it in about 5 days using some vast.ai instances.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 25/10/2023, 14:10:47 UTC

Code:
#include <iostream>
#include <vector>...

  • Bytea HASH160 Search by NoMachine
  • Sat Oct 21 10:39:23 2023
  • Puzzle: 15
  • Public Key Hash (Hash 160): fe7c45126731f7384640b0b0045fd40bac72e2a2
  • PUZZLE SOLVED: 2023-10-21 10:39:24
  • Target Public Key Hash (Hash160) found! Private Key: 00000000000000000000000000000000000000000
Hi @nomachine

how to make it work sequential instead of random ?
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 18/10/2023, 11:58:22 UTC

You could be working in a 50 bit range or a 256 bit range; and you can subtract, divide, multiply, etc. whatever you want to do, or you can use whatever stride you can some up with, 14, 87, 1234344564, 47398573854734834, etc., it won't work because again, you could go around the curve and you won't know where the key lies or where to start your stride function from.

There is truly only one way to take advantage of a stride function; and I stated that months ago. My problem was, I could not create a stride function inside of CUDA. Or else I would have found 130's key already lol.



If you write the exact step code you want, there will be friends who will try to help. If you draw the algorithm flow diagram they can help you

I wrote my own brute-forcer that implements stride on CUDA. actually I'm running it 24/7 for #66.

glad to see that people are focusing on new algos and scripts, I feel that someone is closer to solution.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 12/10/2023, 13:13:54 UTC
If someone will please solve this puzzle for me then I will give you some of the profits I make.

Please let me know when you have a solution for me.  I am willing to pay up to 10% of all profits to you just for solving the puzzle for me.

Thanks.  Wink


So Someone will find the key "for you" and you will give 10% for that ?

Funny Joke.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 09/10/2023, 09:59:46 UTC
Here, if anyone is interested, I have managed to divide puzzle 115 by 2^23 without reaching fractions, but in order to do that, you'd need to guess the last 6 characters.

Code:
from sympy import mod_inverse

N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141

def ters(scalar, target):
    k = mod_inverse(2, N)
    scalar_bin = bin(scalar)[2:]
    for i in range(len(scalar_bin)):
        if scalar_bin[i] == '0':
            result = (target * k) % N
        else:
            result = ((target * k) % N + N - 1) % N
        target = result
    return result

target1 = 31464123230573852164273674364426950
target2 = 6331078

print("Target results:")
for x in range(8388608, 8388700):
    result1 = ters(x, target1)
    (f"T1: {result1:x}")
for x in range(8388608, 8388700):
    result2 = ters(x, target2)
    (f"T2: {result2:x}")
for x in range(8388608, 8388700):
    result1 = ters(x, target1)
    result2 = ters(x, target2)
    subtraction = (result1  - result2) % N
    print(f"S:{subtraction:x}")


I still don't understand what you need to do to find the private key after find the key subtraction result, if I understand it maybe I could write a CUDA version for it.
Post
Topic
Board Bitcoin Discussion
Re: == Bitcoin challenge transaction: ~1000 BTC total bounty to solvers! ==UPDATED==
by
rosengold
on 05/10/2023, 23:42:16 UTC
Interesting...seeking legal advice and avoiding exchanges... However, how does one convert the coins from these puzzles into spendable cash without an exchange? And it’s somewhat disappointing not being able to spend it all at once if one wishes to, minus taxes and so forth. I haven’t found any legal provision that clarifies the management of bitcoins you ‘find’, or earn from solving a puzzle, or inherit... especially if you aren’t one of the big whales, who I suspect have their systems in place already Smiley)

I'm amazed on how people think that CES are the real players in crypto world. In particular I'll NEVER trade any crypto by using Centralized Exchanges.

IF you or anyone find a key just seek for a trusted P2P near you, trade small ammounts and avoid government, or better take everything by cash  buy a house for you, buy another house and rent it and live without any shitty taxes from politics.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
rosengold
on 11/08/2023, 20:20:31 UTC
Puzzle #66 is not about pattern dudes

is all about logic and hardware power

If you have a bunch of 4090's out there and a optimized software to search it so you are in the game, If no you'll realize that is not simple as you think.

there's no pattern.
Post
Topic
Board Project Development
Re: [BETA] MoonWalker - Just Another Bitcoin Brute Forcer
by
rosengold
on 11/08/2023, 11:20:25 UTC
Opensource the code or no one will use this.

This seems like a piss poor attempt to try infect people nothing more.

Must try harder.  Or just fuck off.

when someone find some puzzle using my tool you'll regret about this shit you wrote.