Search content
Sort by

Showing 20 of 582 results by GoldTiger69
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 22/04/2025, 03:14:05 UTC
It's not in this range either: 10000000000000000:80000000000000000

Code:
time ./keyhunt -m bsgs -t 6 -f tests/farou9_pubkey.txt -r 10000000000000000:80000000000000000 -n 0x1000000000000000 -M -s 0 -S -k 4
[+] Version 0.2.230430 Satoshi Quest, developed by AlbertoBSD

End

real 35m15.934s
user 192m37.033s
sys 0m13.839s


Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 22/04/2025, 01:35:56 UTC
046aa3ec6fbe6188788ee0a5a18f95e405741f1b636559b355a857817a2e921160c85ca3b348638 d82ec4c3a986b2c58062b10a499afd5516581591127559925df  can someone check if this pubk has a 68bit scalar                   
I repeat can anyone help with this

Code:
time ./keyhunt -m bsgs -t 4 -f tests/farou9_pubkey.txt -r 80000000000000000:100000000000000000 -n 0x1000000000000000 -M -s 0 -S -k 4
[+] Version 0.2.230430 Satoshi Quest, developed by AlbertoBSD

End

real 56m58.405s
user 217m20.758s
sys 0m15.504s

It seems like it's not in this range:  80000000000000000:100000000000000000
Cheers!
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 16/04/2025, 02:07:35 UTC
19vkiEajfhuAsLEKoBmxpNrGpZYBbCPoPr
If you have the address, can you share the hex code?

Or can you change the prefix?

You don't share the hex from yours but ask for the others... hmmmm, interesting
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 13/04/2025, 22:20:00 UTC
I found this haha ​​it's a joke  Tongue
Hash160: 61eb8a50c8673cd3fd9d73ee90c733ff24b6e64f
BTC Address: 19vkiEajf1jD23km6G6DdSQXH2VhWP3kHG

I found this one:
PK:   19665F6056877D8B5B
Public Key    : 02502C2518C06231BDDACA06491E0B790DB9478B56B8DCD2E255CA7E7380E97267
Found Hash160 : 61eb8a50c8673c376c4bdb96d179afecaadbd140

I'm very curious about the distance between the 2 addresses.
Post
Topic
Board Bitcoin Technical Support
Re: Multibit HD YAML Files with encryptedPassword and encryptedBackupKey
by
GoldTiger69
on 03/04/2025, 16:06:57 UTC
Does anyone at all know what these 2 values in the YAML file could be used for?

I'm answering the above question.
Post
Topic
Board Bitcoin Technical Support
Re: Multibit HD YAML Files with encryptedPassword and encryptedBackupKey
by
GoldTiger69
on 03/04/2025, 15:12:22 UTC
Does anyone at all know what these 2 values in the YAML file could be used for?
I guess I am going to do a deep dive into the Multibit HD code itself to find out how it gets utilized, but if in the meantime anybody actually knows something about this.

I hope I can figure this out because my cut is about $20K worth of the BTC.

I found this answer from one of the developers of Multibit, hope it helps:
https://bitcointalk.org/index.php?topic=1198563.msg12590985#msg12590985

Btw, I recovered the wallet of the OP.

Cheers.
Post
Topic
Board MultiBit
Re: Over .5 BTC in corrupt Multibit HD 0.5.1 wallet
by
GoldTiger69
on 03/04/2025, 03:16:56 UTC
The characters that you are getting out of the Base64 are bytes; that's why you can't 'read' them. I have worked with Multibit wallets in the past; and let me tell you, they can be a pain in you know where. If you want, I can try to recover/restore the wallet you are working with, just let me know.

Cheers.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 01/04/2025, 19:10:01 UTC
Hey guys, looks like Mutagen is grabbing some traction; How about a new thread for it exclusively? Just saying.

Cheers.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 25/03/2025, 03:22:35 UTC
Optimized version is there. Good luck.

https://github.com/NoMachine1/Cyclone

 Grin

Hi, I think I found a small bug:
Code:
./Cyclone -h 95a156cd21b4a69de969eb6716864f4c8b82a82a -p 40 -t 4 -b 5

================= WORK IN PROGRESS =================
Puzzle/Bits   : 40
Target Hash160: 95a156cd21b4a69de969eb6716864f4c8b82a82a
Prefix length : 5 bytes
Mode          : Sequential
CPU Threads   : 4
Mkeys/s       : 23.31
Total Checked : 166785826816
Elapsed Time  : 01:59:15
Range         : 8000000000:ffffffffff
Progress      : 30.338165 %
Progress Save : 11
Stride        : 1
================== FOUND MATCH! ====================
Private Key   : 000000000000000000000000000000000000000000000000000000E9AE4933D7
Public Key    : 027F9692C97565C48481E19FB95933C3F023D91DEF62394A38FF6B1ACA6E499EB5
Total Checked : 166891761152
Elapsed Time  : 01:59:15
Speed         : 23.3083 Mkeys/s


This is puzzle #40; the Private Key is off by 1: E9AE4933D6

It's a great program, thanks for all your hard work, man.
Post
Topic
Board Development & Technical Discussion
Re: Cyclone - fastest CPU Satoshi's puzzle solver (only CPU)
by
GoldTiger69
on 11/03/2025, 20:38:34 UTC
@nomachine: Thanks a lot, indeed that was the problem!

Cheers!
Post
Topic
Board Development & Technical Discussion
Re: Cyclone - fastest CPU Satoshi's puzzle solver (only CPU)
by
GoldTiger69
on 10/03/2025, 22:11:34 UTC
I have ~190 Mkey/s with this searching directly Hash160 targets in pure random mode.

Code:
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <sstream>
#include <fstream>
#include <cmath>
#include <chrono>
#include <cstring>
#include <algorithm>
#include <omp.h>
#include <random>
#include <immintrin.h>
// Adding program modules
#include "sha256_avx2.h"
#include "ripemd160_avx2.h"
#include "SECP256K1.h"
#include "Point.h"
#include "Int.h"
#include "IntGroup.h"

#define BISIZE 256
#if BISIZE == 256
#define NB64BLOCK 5
#define NB32BLOCK 10
#else
#error Unsupported size
#endif

//------------------------------------------------------------------------------
// Constants
static constexpr int POINTS_BATCH_SIZE = 256;
static constexpr int HASH_BATCH_SIZE   = 8;

// Status output and progress saving frequency
static constexpr double statusIntervalSec = 5.0;
static constexpr double saveProgressIntervalSec = 300.0;

static int g_progressSaveCount = 0;
static std::vector<std::string> g_threadPrivateKeys;

//------------------------------------------------------------------------------
void saveProgressToFile(const std::string &progressStr)
{
    std::ofstream ofs("progress.txt", std::ios::app);
    if (ofs) {
        ofs << progressStr << "\n";
    } else {
        std::cerr << "Cannot open progress.txt for writing\n";
    }
}

//------------------------------------------------------------------------------
//Converts a HEX string into a large number (a vector of 64-bit words, little-endian).

std::vector<uint64_t> hexToBigNum(const std::string& hex) {
    std::vector<uint64_t> bigNum;
    const size_t len = hex.size();
    bigNum.reserve((len + 15) / 16);
    for (size_t i = 0; i < len; i += 16) {
        size_t start = (len >= 16 + i) ? len - 16 - i : 0;
        size_t partLen = (len >= 16 + i) ? 16 : (len - i);
        uint64_t value = std::stoull(hex.substr(start, partLen), nullptr, 16);
        bigNum.push_back(value);
    }
    return bigNum;
}

//Reverse conversion to a HEX string (with correct leading zeros within blocks).

std::string bigNumToHex(const std::vector<uint64_t>& num) {
    std::ostringstream oss;
    for (auto it = num.rbegin(); it != num.rend(); ++it) {
         if (it != num.rbegin())
            oss << std::setw(16) << std::setfill('0');
        oss << std::hex << *it;
    }
    return oss.str();
}

std::vector<uint64_t> singleElementVector(uint64_t val) {
    return { val };
}

std::vector<uint64_t> bigNumAdd(const std::vector<uint64_t>& a, const std::vector<uint64_t>& b) {
    std::vector<uint64_t> sum;
    sum.reserve(std::max(a.size(), b.size()) + 1);
    uint64_t carry = 0;
    for (size_t i = 0, sz = std::max(a.size(), b.size()); i < sz; ++i) {
        uint64_t x = (i < a.size()) ? a[i] : 0ULL;
        uint64_t y = (i < b.size()) ? b[i] : 0ULL;
        __uint128_t s = ( __uint128_t )x + ( __uint128_t )y + carry;
        carry = (uint64_t)(s >> 64);
        sum.push_back((uint64_t)s);
    }
    if (carry) sum.push_back(carry);
    return sum;
}

std::vector<uint64_t> bigNumSubtract(const std::vector<uint64_t>& a, const std::vector<uint64_t>& b) {
    std::vector<uint64_t> diff = a;
    uint64_t borrow = 0;
    for (size_t i = 0; i < b.size(); ++i) {
        uint64_t subtrahend = b[i];
        if (diff[i] < subtrahend + borrow) {
            diff[i] = diff[i] + (~0ULL) - subtrahend - borrow + 1ULL; // eqv diff[i] = diff[i] - subtrahend - borrow
            borrow = 1ULL;
        } else {
            diff[i] -= (subtrahend + borrow);
            borrow = 0ULL;
        }
    }
   
    for (size_t i = b.size(); i < diff.size() && borrow; ++i) {
        if (diff[i] == 0ULL) {
            diff[i] = ~0ULL;
        } else {
            diff[i] -= 1ULL;
            borrow = 0ULL;
        }
    }
    // delete leading zeros
    while (!diff.empty() && diff.back() == 0ULL)
        diff.pop_back();
    return diff;
}


std::pair<std::vector<uint64_t>, uint64_t> bigNumDivide(const std::vector<uint64_t>& a, uint64_t divisor) {
    std::vector<uint64_t> quotient(a.size(), 0ULL);
    uint64_t remainder = 0ULL;
    for (int i = (int)a.size() - 1; i >= 0; --i) {
        __uint128_t temp = ((__uint128_t)remainder << 64) | a[i];
        uint64_t q = (uint64_t)(temp / divisor);
        uint64_t r = (uint64_t)(temp % divisor);
        quotient[i] = q;
        remainder   = r;
    }
    while (!quotient.empty() && quotient.back() == 0ULL)
        quotient.pop_back();
    return { quotient, remainder };
}

long double hexStrToLongDouble(const std::string &hex) {
    long double result = 0.0L;
    for (char c : hex) {
        result *= 16.0L;
        if (c >= '0' && c <= '9')
            result += (c - '0');
        else if (c >= 'a' && c <= 'f')
            result += (c - 'a' + 10);
        else if (c >= 'A' && c <= 'F')
            result += (c - 'A' + 10);
    }
    return result;
}

//------------------------------------------------------------------------------
static inline std::string padHexTo64(const std::string &hex) {
    return (hex.size() >= 64) ? hex : std::string(64 - hex.size(), '0') + hex;
}
static inline Int hexToInt(const std::string &hex) {
    Int number;
    char buf[65] = {0};
    std::strncpy(buf, hex.c_str(), 64);
    number.SetBase16(buf);
    return number;
}
static inline std::string intToHex(const Int &value) {
    Int temp;
    temp.Set((Int*)&value);
    return temp.GetBase16();
}
static inline bool intGreater(const Int &a, const Int &b) {
    std::string ha = ((Int&)a).GetBase16();
    std::string hb = ((Int&)b).GetBase16();
    if (ha.size() != hb.size()) return (ha.size() > hb.size());
    return (ha > hb);
}
static inline bool isEven(const Int &number) {
    return ((Int&)number).IsEven();
}

static inline std::string intXToHex64(const Int &x) {
    Int temp;
    temp.Set((Int*)&x);
    std::string hex = temp.GetBase16();
    if (hex.size() < 64)
        hex.insert(0, 64 - hex.size(), '0');
    return hex;
}

static inline std::string pointToCompressedHex(const Point &point) {
    return (isEven(point.y) ? "02" : "03") + intXToHex64(point.x);
}
static inline void pointToCompressedBin(const Point &point, uint8_t outCompressed[33]) {
    outCompressed[0] = isEven(point.y) ? 0x02 : 0x03;
    Int temp;
    temp.Set((Int*)&point.x);
    for (int i = 0; i < 32; i++) {
        outCompressed[1 + i] = (uint8_t)temp.GetByte(31 - i);
    }
}

//------------------------------------------------------------------------------
inline void prepareShaBlock(const uint8_t* dataSrc, size_t dataLen, uint8_t* outBlock) {
    std::fill_n(outBlock, 64, 0);
    std::memcpy(outBlock, dataSrc, dataLen);
    outBlock[dataLen] = 0x80;
    const uint32_t bitLen = (uint32_t)(dataLen * 8);
    outBlock[60] = (uint8_t)((bitLen >> 24) & 0xFF);
    outBlock[61] = (uint8_t)((bitLen >> 16) & 0xFF);
    outBlock[62] = (uint8_t)((bitLen >>  8) & 0xFF);
    outBlock[63] = (uint8_t)( bitLen        & 0xFF);
}
inline void prepareRipemdBlock(const uint8_t* dataSrc, uint8_t* outBlock) {
    std::fill_n(outBlock, 64, 0);
    std::memcpy(outBlock, dataSrc, 32);
    outBlock[32] = 0x80;
    const uint32_t bitLen = 256;
    outBlock[60] = (uint8_t)((bitLen >> 24) & 0xFF);
    outBlock[61] = (uint8_t)((bitLen >> 16) & 0xFF);
    outBlock[62] = (uint8_t)((bitLen >>  8) & 0xFF);
    outBlock[63] = (uint8_t)( bitLen        & 0xFF);
}

// Computing hash160 using avx2 (8 hashes per try)
static void computeHash160BatchBinSingle(int numKeys,
                                         uint8_t pubKeys[][33],
                                         uint8_t hashResults[][20])
{
    alignas(32) std::array<std::array<uint8_t, 64>, HASH_BATCH_SIZE> shaInputs;
    alignas(32) std::array<std::array<uint8_t, 32>, HASH_BATCH_SIZE> shaOutputs;
    alignas(32) std::array<std::array<uint8_t, 64>, HASH_BATCH_SIZE> ripemdInputs;
    alignas(32) std::array<std::array<uint8_t, 20>, HASH_BATCH_SIZE> ripemdOutputs;

    const size_t totalBatches = (numKeys + (HASH_BATCH_SIZE - 1)) / HASH_BATCH_SIZE;
    for (size_t batch = 0; batch < totalBatches; batch++) {
        const size_t batchCount = std::min<size_t>(HASH_BATCH_SIZE, numKeys - batch * HASH_BATCH_SIZE);
        for (size_t i = 0; i < batchCount; i++) {
            const size_t idx = batch * HASH_BATCH_SIZE + i;
            prepareShaBlock(pubKeys[idx], 33, shaInputs[i].data());
        }
        for (size_t i = batchCount; i < HASH_BATCH_SIZE; i++) {
            std::memcpy(shaInputs[i].data(), shaInputs[0].data(), 64);
        }
        const uint8_t* inPtr[HASH_BATCH_SIZE];
        uint8_t* outPtr[HASH_BATCH_SIZE];
        for (int i = 0; i < HASH_BATCH_SIZE; i++) {
            inPtr[i]  = shaInputs[i].data();
            outPtr[i] = shaOutputs[i].data();
        }
        // SHA256 (avx2)
        sha256avx2_8B(inPtr[0], inPtr[1], inPtr[2], inPtr[3],
                      inPtr[4], inPtr[5], inPtr[6], inPtr[7],
                      outPtr[0], outPtr[1], outPtr[2], outPtr[3],
                      outPtr[4], outPtr[5], outPtr[6], outPtr[7]);

        // Preparing Ripemd160
        for (size_t i = 0; i < batchCount; i++) {
            prepareRipemdBlock(shaOutputs[i].data(), ripemdInputs[i].data());
        }
        for (size_t i = batchCount; i < HASH_BATCH_SIZE; i++) {
            std::memcpy(ripemdInputs[i].data(), ripemdInputs[0].data(), 64);
        }
        for (int i = 0; i < HASH_BATCH_SIZE; i++) {
            inPtr[i]  = ripemdInputs[i].data();
            outPtr[i] = ripemdOutputs[i].data();
        }
        // Ripemd160 (avx2)
        ripemd160avx2::ripemd160avx2_32(
            (unsigned char*)inPtr[0],
            (unsigned char*)inPtr[1],
            (unsigned char*)inPtr[2],
            (unsigned char*)inPtr[3],
            (unsigned char*)inPtr[4],
            (unsigned char*)inPtr[5],
            (unsigned char*)inPtr[6],
            (unsigned char*)inPtr[7],
            outPtr[0], outPtr[1], outPtr[2], outPtr[3],
            outPtr[4], outPtr[5], outPtr[6], outPtr[7]
        );
        for (size_t i = 0; i < batchCount; i++) {
            const size_t idx = batch * HASH_BATCH_SIZE + i;
            std::memcpy(hashResults[idx], ripemdOutputs[i].data(), 20);
        }
    }
}

//------------------------------------------------------------------------------
static void printUsage(const char* programName) {
    std::cerr << "Usage: " << programName << " -h <hash160_hex> -p <puzzle>\n";
}

static std::string formatElapsedTime(double seconds) {
    int hrs = (int)seconds / 3600;
    int mins = ((int)seconds % 3600) / 60;
    int secs = (int)seconds % 60;
    std::ostringstream oss;
    oss << std::setw(2) << std::setfill('0') << hrs << ":"
        << std::setw(2) << std::setfill('0') << mins << ":"
        << std::setw(2) << std::setfill('0') << secs;
    return oss.str();
}

//------------------------------------------------------------------------------
static void printStatsBlock(int numCPUs, const std::string &targetHash160Hex,
                            const std::string &rangeStr, double mkeysPerSec,
                            unsigned long long totalChecked, double elapsedTime,
                            int puzzle)
{
    static bool firstPrint = true;
    if (!firstPrint) {
        std::cout << "\033[8A";
    } else {
        firstPrint = false;
    }
    std::cout << "================= WORK IN PROGRESS =================\n";
    std::cout << "Puzzle        : " << puzzle << "\n";  // Print puzzle value
    std::cout << "Range         : " << rangeStr << "\n";
    std::cout << "Target Hash160: " << targetHash160Hex << "\n";
    std::cout << "CPU Threads   : " << numCPUs << "\n";
    std::cout << "Mkeys/s       : " << std::fixed << std::setprecision(2) << mkeysPerSec << "\n";
    std::cout << "Total Checked : " << totalChecked << "\n";
    std::cout << "Elapsed Time  : " << formatElapsedTime(elapsedTime) << "\n";
    std::cout.flush();
}


struct ThreadRange {
    std::string startHex;
    std::string endHex;
};

static std::vector<ThreadRange> g_threadRanges;

class Timer {
public:
    static std::string getSeed(int length) {
        auto now = std::chrono::high_resolution_clock::now();
        auto epoch = now.time_since_epoch();
        auto value = std::chrono::duration_cast<std::chrono::nanoseconds>(epoch).count();
        std::ostringstream oss;
        oss << std::hex << value;
        return oss.str().substr(0, length);
    }
};

Int generateRandomPrivateKey(Int minKey, Int range) {
    // Use a high-resolution clock to seed the random number generator
    static std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());

    Int randomPrivateKey((uint64_t)0);

    // Generate random values in chunks of 64 bits
    for (int i = 0; i < NB64BLOCK; ++i) {
        uint64_t randVal = rng();
        randomPrivateKey.ShiftL(64);  // Shift left by 64 bits
        randomPrivateKey.Add(randVal);
    }

    // Apply modulo operation and add minKey
    randomPrivateKey.Mod(&range); 
    randomPrivateKey.Add(&minKey);     

    return randomPrivateKey;
}

Int minKey, maxKey;

int main(int argc, char *argv[]) {
    bool hash160Provided = false, rangeProvided = false;
    std::string targetHash160Hex;
    std::vector<uint8_t> targetHash160;
    int puzzle = 0;  // Declare puzzle variable

    // Parse command-line arguments
    for (int i = 1; i < argc; i++) {
        if (!std::strcmp(argv[i], "-h") && i + 1 < argc) {  // Use -h for hash160_hex
            targetHash160Hex = argv[++i];
            hash160Provided = true;
            // Convert the hex string to a byte array
            targetHash160.resize(20);
            for (size_t j = 0; j < 20; j++) {
                targetHash160[j] = std::stoul(targetHash160Hex.substr(j * 2, 2), nullptr, 16);
            }
        } else if (!std::strcmp(argv[i], "-p") && i + 1 < argc) {
            puzzle = std::stoi(argv[++i]);
            if (puzzle <= 0) {
                std::cerr << "Invalid puzzle value. Must be greater than 0.\n";
                return 1;
            }

            Int one, range;
            one.SetBase10(const_cast<char*>("1"));
            minKey = one;
            minKey.ShiftL(puzzle - 1); // Start of range: 2^(puzzle-1)
            maxKey = one;
            maxKey.ShiftL(puzzle);     // End of range: 2^puzzle - 1
            maxKey.Sub(&one);
            range = maxKey;
            range.Sub(&minKey);

            rangeProvided = true;
        } else {
            std::cerr << "Unknown parameter: " << argv[i] << "\n";
            printUsage(argv[0]);
            return 1;
        }
    }

    if (!hash160Provided || !rangeProvided) {
        std::cerr << "Both -h and -p are required!\n";
        printUsage(argv[0]);
        return 1;
    }

    // Convert range to big numbers
    auto rangeStart = hexToBigNum(intToHex(minKey));
    auto rangeEnd = hexToBigNum(intToHex(maxKey));

    // Validate range
    bool validRange = false;
    if (rangeStart.size() < rangeEnd.size()) {
        validRange = true;
    } else if (rangeStart.size() > rangeEnd.size()) {
        validRange = false;
    } else {
        validRange = true;
        for (int i = (int)rangeStart.size() - 1; i >= 0; --i) {
            if (rangeStart[i] < rangeEnd[i]) {
                break;
            } else if (rangeStart[i] > rangeEnd[i]) {
                validRange = false;
                break;
            }
        }
    }
    if (!validRange) {
        std::cerr << "Range start must be less than range end.\n";
        return 1;
    }

    auto rangeSize = bigNumSubtract(rangeEnd, rangeStart);
    rangeSize = bigNumAdd(rangeSize, singleElementVector(1ULL));

    const std::string rangeSizeHex = bigNumToHex(rangeSize);
   
    const long double totalRangeLD = hexStrToLongDouble(rangeSizeHex);

    const int numCPUs = omp_get_num_procs();
    g_threadPrivateKeys.resize(numCPUs, "0");

    auto [chunkSize, remainder] = bigNumDivide(rangeSize, (uint64_t)numCPUs);
    g_threadRanges.resize(numCPUs);

    std::vector<uint64_t> currentStart = rangeStart;
    for (int t = 0; t < numCPUs; t++) {
        auto currentEnd = bigNumAdd(currentStart, chunkSize);
        if (t < (int)remainder) {
            currentEnd = bigNumAdd(currentEnd, singleElementVector(1ULL));
        }
        currentEnd = bigNumSubtract(currentEnd, singleElementVector(1ULL));

        g_threadRanges[t].startHex = bigNumToHex(currentStart);
        g_threadRanges[t].endHex   = bigNumToHex(currentEnd);

        currentStart = bigNumAdd(currentEnd, singleElementVector(1ULL));
    }
    const std::string displayRange = g_threadRanges.front().startHex + ":" + g_threadRanges.back().endHex;

    unsigned long long globalComparedCount = 0ULL;
    double globalElapsedTime = 0.0;
    double mkeysPerSec       = 0.0;

    const auto tStart = std::chrono::high_resolution_clock::now();
    auto lastStatusTime = tStart;
    auto lastSaveTime   = tStart;

    bool matchFound            = false;
    std::string foundPrivateKeyHex;

    Int one; one.SetBase10(const_cast<char*>("1"));
    Int minKey = one;
    minKey.ShiftL(puzzle - 1); // Start of range: 2^(puzzle-1)
    Int maxKey = one;
    maxKey.ShiftL(puzzle);     // End of range: 2^puzzle - 1
    maxKey.Sub(&one);
    Int range = maxKey;
    range.Sub(&minKey);

    Secp256K1 secp;
    secp.Init();

    // PARRALEL COMPUTING BLOCK
    #pragma omp parallel num_threads(numCPUs) \
      shared(globalComparedCount, globalElapsedTime, mkeysPerSec, matchFound, \
             foundPrivateKeyHex, tStart, lastStatusTime, lastSaveTime, g_progressSaveCount, \
             g_threadPrivateKeys)
    {
        const int threadId = omp_get_thread_num();

        Int privateKey = hexToInt(g_threadRanges[threadId].startHex);
        const Int threadRangeEnd = hexToInt(g_threadRanges[threadId].endHex);

        #pragma omp critical
        {
            g_threadPrivateKeys[threadId] = padHexTo64(intToHex(privateKey));
        }

        // Precomputing +i*G and -i*G for i=0..255
        std::vector<Point> plusPoints(POINTS_BATCH_SIZE);
        std::vector<Point> minusPoints(POINTS_BATCH_SIZE);
        for (int i = 0; i < POINTS_BATCH_SIZE; i++) {
            Int tmp; tmp.SetInt32(i);
            Point p = secp.ComputePublicKey(&tmp);
            plusPoints[i] = p;
            p.y.ModNeg();
            minusPoints[i] = p;
        }

        // Arrays for batch-adding
        std::vector<Int>  deltaX(POINTS_BATCH_SIZE);
        IntGroup modGroup(POINTS_BATCH_SIZE);

        // Save 512 publickeys
        const int fullBatchSize = 2 * POINTS_BATCH_SIZE;
        std::vector<Point> pointBatch(fullBatchSize);

        // Buffers for hashing
        uint8_t localPubKeys[fullBatchSize][33];
        uint8_t localHashResults[HASH_BATCH_SIZE][20];
        int localBatchCount = 0;
        int pointIndices[HASH_BATCH_SIZE];

        // Local count
        unsigned long long localComparedCount = 0ULL;

        // Download the target (hash160) в __m128i for fast compare
        __m128i target16 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(targetHash160.data()));

        // main
    // Main loop for generating random private keys
    while (!matchFound) {
        // Generate a random private key within the thread's range
        Int currentBatchKey = generateRandomPrivateKey(minKey, range);
 
         
            currentBatchKey.Set(&privateKey);
            Point startPoint = secp.ComputePublicKey(&currentBatchKey);

            #pragma omp critical
            {
                g_threadPrivateKeys[threadId] = padHexTo64(intToHex(privateKey));
            }

            // Divide the batch of 512 keys into 2 blocks of 256 keys, count +256 and -256 from the center G-point of the batch
            // First pointBatch[0..255] +
            for (int i = 0; i < POINTS_BATCH_SIZE; i++) {
                deltaX[i].ModSub(&plusPoints[i].x, &startPoint.x);
            }
            modGroup.Set(deltaX.data());
            modGroup.ModInv();
            for (int i = 0; i < POINTS_BATCH_SIZE; i++) {
                Point tempPoint = startPoint;
                Int deltaY;
                deltaY.ModSub(&plusPoints[i].y, &startPoint.y);
                Int slope;
                slope.ModMulK1(&deltaY, &deltaX[i]);
                Int slopeSq;
                slopeSq.ModSquareK1(&slope);

                Int tmpX;
                tmpX.Set(&startPoint.x);
                tmpX.ModNeg();
                tmpX.ModAdd(&slopeSq);
                tmpX.ModSub(&plusPoints[i].x);
                tempPoint.x.Set(&tmpX);

                Int diffX;
                diffX.Set(&startPoint.x);
                diffX.ModSub(&tempPoint.x);
                diffX.ModMulK1(&slope);
                tempPoint.y.ModNeg();
                tempPoint.y.ModAdd(&diffX);

                pointBatch[i] = tempPoint;
            }

            // Second pointBatch[256..511] -
            for (int i = 0; i < POINTS_BATCH_SIZE; i++) {
                Point tempPoint = startPoint;
                Int deltaY;
                deltaY.ModSub(&minusPoints[i].y, &startPoint.y);
                Int slope;
                slope.ModMulK1(&deltaY, &deltaX[i]);
                Int slopeSq;
                slopeSq.ModSquareK1(&slope);

                Int tmpX;
                tmpX.Set(&startPoint.x);
                tmpX.ModNeg();
                tmpX.ModAdd(&slopeSq);
                tmpX.ModSub(&minusPoints[i].x);
                tempPoint.x.Set(&tmpX);

                Int diffX;
                diffX.Set(&startPoint.x);
                diffX.ModSub(&tempPoint.x);
                diffX.ModMulK1(&slope);
                tempPoint.y.ModNeg();
                tempPoint.y.ModAdd(&diffX);

                pointBatch[POINTS_BATCH_SIZE + i] = tempPoint;
            }

            // Construct local buffeer
            for (int i = 0; i < fullBatchSize; i++) {
                pointToCompressedBin(pointBatch[i], localPubKeys[localBatchCount]);
                pointIndices[localBatchCount] = i;
                localBatchCount++;

                // 8 keys are ready - time to use avx2
                if (localBatchCount == HASH_BATCH_SIZE) {
                    computeHash160BatchBinSingle(localBatchCount, localPubKeys, localHashResults);
                    // Results check
                    for (int j = 0; j < HASH_BATCH_SIZE; j++) {
                        __m128i cand16 = _mm_loadu_si128(reinterpret_cast<const __m128i*>(localHashResults[j]));
                        __m128i cmp = _mm_cmpeq_epi8(cand16, target16);
                        if (_mm_movemask_epi8(cmp) == 0xFFFF) {
                            // Checking last 4 bytes (20 - 16)
                            if (!matchFound && std::memcmp(localHashResults[j], targetHash160.data(), 20) == 0) {
                                #pragma omp critical
                                {
                                    if (!matchFound) {
                                        matchFound = true;
                                        auto tEndTime = std::chrono::high_resolution_clock::now();
                                        globalElapsedTime = std::chrono::duration<double>(tEndTime - tStart).count();
                                        mkeysPerSec = (double)(globalComparedCount + localComparedCount) / globalElapsedTime / 1e6;

                                        // Recovering private key
                                        Int matchingPrivateKey;
                                        matchingPrivateKey.Set(&currentBatchKey);
                                        int idx = pointIndices[j];
                                        if (idx < 256) {
                                            Int offset; offset.SetInt32(idx);
                                            matchingPrivateKey.Add(&offset);
                                        } else {
                                            Int offset; offset.SetInt32(idx - 256);
                                            matchingPrivateKey.Sub(&offset);
                                        }
                                        foundPrivateKeyHex = padHexTo64(intToHex(matchingPrivateKey));
                                    }
                                }
                                #pragma omp cancel parallel
                            }
                            localComparedCount++;
                        } else {
                            localComparedCount++;
                        }
                    }
                    localBatchCount = 0;
                }
            }

            // Next step
            {
                Int step;
                step.SetInt32(fullBatchSize - 2); // 510
                privateKey.Add(&step);
            }

            // Time to show status
            auto now = std::chrono::high_resolution_clock::now();
            double secondsSinceStatus = std::chrono::duration<double>(now - lastStatusTime).count();
            if (secondsSinceStatus >= statusIntervalSec) {
                #pragma omp critical
                {
                    globalComparedCount += localComparedCount;
                    localComparedCount = 0ULL;
                    globalElapsedTime = std::chrono::duration<double>(now - tStart).count();
                    mkeysPerSec = (double)globalComparedCount / globalElapsedTime / 1e6;

                    printStatsBlock(numCPUs, targetHash160Hex, displayRange,
                    mkeysPerSec, globalComparedCount,
                    globalElapsedTime, puzzle);
                    lastStatusTime = now;
                }
            }

            if (matchFound) {
                break;
            }
        } // while(true)

        // Adding local count
        #pragma omp atomic
        globalComparedCount += localComparedCount;
    } // end of parralel section

    // Main results
    auto tEnd = std::chrono::high_resolution_clock::now();
    globalElapsedTime = std::chrono::duration<double>(tEnd - tStart).count();

    if (!matchFound) {
        mkeysPerSec = (double)globalComparedCount / globalElapsedTime / 1e6;
        std::cout << "\nNo match found.\n";
        std::cout << "Total Checked : " << globalComparedCount << "\n";
        std::cout << "Elapsed Time  : " << formatElapsedTime(globalElapsedTime) << "\n";
        std::cout << "Speed         : " << mkeysPerSec << " Mkeys/s\n";
        return 0;
    }


    // If the key was found
    std::cout << "================== FOUND MATCH! ==================\n";
    std::cout << "Private Key   : " << foundPrivateKeyHex << "\n";
    std::cout << "Total Checked : " << globalComparedCount << "\n";
    std::cout << "Elapsed Time  : " << formatElapsedTime(globalElapsedTime) << "\n";
    std::cout << "Speed         : " << mkeysPerSec << " Mkeys/s\n";
    return 0;
}


Code:
./Cyclone -h bfebb73562d4541b32a02ba664d140b5a574792f -p 26


Hi, thanks for the code. I'm having some trouble to compile it on Ubuntu 24.04; this is the error I get when I try to 'make' it:
Code:
Cyclone.cpp:234:70: error: aggregate ‘std::array<std::array<unsigned char, 64>, 8> shaInputs’ has incomplete type and cannot be defined
  234 |     alignas(32) std::array<std::array<uint8_t, 64>, HASH_BATCH_SIZE> shaInputs;
      |                                                                      ^~~~~~~~~

Thanks in advance.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 01/11/2024, 01:10:36 UTC
Code:
BTC Address(c): 1ECDLP8osCZHBB1LH5PVAUfFegeMgFb52q

minKey = 0x659756abf6c17ca70e0000000000000000000140be6ddd93e441f8d4b4a85653b20b4cdcc5c748207a0daa16191d07a425d8080c276f9412472e0429e61bc355
maxKey = 0x659756abf6c17ca70fffffffffffffffffffff40be6ddd93e441f8d4b4a85653b20b4cdcc5c748207a0daa16191d07a425d8080c276f9412472e0429e61bc355

The problem I see with those keys is that, when you mod them to fit the curve, they are far than 80 bits apart. Just saying.

Good luck to everybody with the challenge.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 09/07/2024, 21:14:41 UTC
Hello, I am the creator of puzzles. I am here to give you clues.

First of all, I would like to point out that puzzles are very difficult and I do not recommend you to spend time on them. We have a limited life..
a quantum computer will never tell where the address is, it can only indicate the number of collisions and frequencies in a certain range

I am sharing the fractal I prepared for the 10,30,50,70,90,110,130,150 puzzle.

PUZZLE 10:  0000000000000000000000000000000000000000000000000000000000000202
PUZZLE 30:  000000000000000000000000000000000000000000000000000000003d94cd64
PUZZLE 50:  00000000000000000000000000000000000000000000000000022bd43c2e9354
PUZZLE 70:  0000000000000000000000000000000000000000000000349b84b6431a6c4ef1
PUZZLE 90:  000000000000000000000000000000000000000002ce00bb2136a445c71e85bf
PUZZLE 110: 00000000000000000000000000000000000035c0d7234df7deb0f20cf7062444
PUZZLE 130: 00000000000000000000000000000002XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PUZZLE 150: 000000000000000000000000003XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Question, guess or probability for the leading number of puzzle 130 and 150, is it 2 or 3?
ANSWER: Puzzle 130 = 2
Puzzle 150= 3


I explained it in the fractal above. That's just how I created the puzzles here. Good luck

If anyone wants to donate, they can send it to this Bitcoin address.

bc1quczhv8fmazkxuwx73mh9pa6aflffq2nmxpw749

Hahahahahahahaha, please! Asking for donations? hahahahahahaha
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 17/08/2023, 21:31:36 UTC
Pollard Kangaroo approach is for the know private key range and for the best, within 125 bit range and of course since you have the Multibit wallet handy all you have to do is "Once you located the files, if you have access to an old multibit app on you computer you need to import the wallet and export the private keys to a new wallet. If you do not have a copy of Multibit, you can use OpenSSL together with your password to decrypt the files and recover the keys."

You need the password to export them. I still have the wallet open every single day since then.
I just keep looking at what value i've missed out on Smiley

I'm confused, do you have the wallet or you don't? How come the wallet is lost and you have it open?

Maybe I'm missing something here?
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 17/08/2023, 18:46:36 UTC
hi members!

I have a multibit classic wallet that currently holds 17BTC
Somewhere in 2014/2015 i lost my wallet password.

Many attempts have been tried to bruteforce the wallet password, without any success.
KeychainX, dave bitcoin, everyone already tried to guess or break my password.


Would you asume there is a possibility to use software to try and recover my wallet using the Pollard approach?
Can someone point me in the right direction on what sofware and settings i should be using?

I still have access to the Multibit wallet, only the password is missing.
I have my wallet address and it's public key.
Maybe this could come in handy to extract certain transaction data?

Thank you

I have experience working with multibit wallets. Maybe I can help.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 30/07/2023, 18:21:12 UTC
I'm sorry, but if pk = 3; then pk -  10 =/= 7, pk - 10 = -7, very different.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 14/07/2023, 17:59:26 UTC
BSGS? sorry but not for 125 and more bit.

the memory will be huge. 

No, for those we have Pollard Kangaroo, and they are math too Wink
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 13/07/2023, 23:56:21 UTC
....
You are right, I didn't even think about it. On the other hand, I understand his point. I can make another pub key and see if he's willing to test his method with me or not.

Just sign a message with the privatekey to proof that you own the privatekey for the pubkey without exposing it.
Post the signature with the used message. Without knowledge of the message the signature can be forged.

Excellent idea!, thank you; now I just need to know if mcdouglasx is willing to play along.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 13/07/2023, 22:14:14 UTC
Sorry, If I manage to solve any puzzle I will give all the information at the moment I do not have a good economic position for it.

Anyone could add x quantity to the puzzle key, generating a different public key and camouflage the puzzle with it, and by giving them information I would be solving the puzzle without knowing it.

then simply subtract that same amount from the camouflaged public key and go back to the puzzle and solve it.

Well, if that is really the problem, here is the private key for that public key:

 priv key HEX:               0x155d735095df3f8c24ee33e4dfe955da
 priv key DEC:               28399010381067550399127235982780880346

 pub key:                       0343b7d69e8372746596980d678d6cdecbffb2927916b3dbd3bc3d27bf5366b166


As you can see, I won't solve any puzzle with the info you provide; I only want to test if your script works or not.

But if you decide not to test it with me, that's OK.

Cheers.

With a known private key, each person can reduce the key to any size.  Here is an example:

115 bit
pub key: 02903740144e9f301f62362813dec638747153d4f18467f32286d09b9b4412768b
priv key: 0x5735095df3f8c24ee33e4dfe955da

85 bit
pub key: 02f50518c0b808dff5bd75f10e146d33677dccbfd18370e64be0c4cc36abc9675f
priv key: 0x1f3f8c24ee33e4dfe955da

40 bit
pub key: 03a0f8f7d72f6199bb09762c8500ed22eba5253f9661f752db338bbf5eeefb1852
priv key: 0xe4dfe955da

By revealing the private key, you will not know whether the method works or not.


You are right, I didn't even think about it. On the other hand, I understand his point. I can make another pub key and see if he's willing to test his method with me or not.
Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
GoldTiger69
on 13/07/2023, 20:49:22 UTC
Sorry, If I manage to solve any puzzle I will give all the information at the moment I do not have a good economic position for it.

Anyone could add x quantity to the puzzle key, generating a different public key and camouflage the puzzle with it, and by giving them information I would be solving the puzzle without knowing it.

then simply subtract that same amount from the camouflaged public key and go back to the puzzle and solve it.

Well, if that is really the problem, here is the private key for that public key:

 priv key HEX:               0x155d735095df3f8c24ee33e4dfe955da
 priv key DEC:               28399010381067550399127235982780880346

 pub key:                       0343b7d69e8372746596980d678d6cdecbffb2927916b3dbd3bc3d27bf5366b166


As you can see, I won't solve any puzzle with the info you provide; I only want to test if your script works or not.

But if you decide not to test it with me, that's OK.

Cheers.