BitCrack Documentation

repository·master·Indexed 22 days ago

https://github.com/brichard19/bitcrack

A high-performance tool for brute-forcing Bitcoin private keys, specifically targeting the Bitcoin puzzle transaction. It supports hardware acceleration via NVIDIA CUDA (cuBitCrack.exe) and OpenCL (clBitCrack.exe). Key features include customizable keyspace ranges, progress saving and resuming via --continue, work distribution using --share, and performance tuning for blocks, threads, and points.

Tokens
2.2K
Snippets
11
Records
13
Agent score
27%

What's inside BitCrack

  1. Use BitCrack to brute-force Bitcoin private keys

    master

    BitCrack is a tool for brute-forcing Bitcoin private keys, often used for solving the Bitcoin puzzle transaction.

    Depending on your hardware, use the appropriate executable:

    • cuBitCrack.exe for NVIDIA CUDA devices.
    • clBitCrack.exe for OpenCL devices (Note: clBitCrack.exe is experimental and may have bugs on some AMD and Intel devices).

    Basic syntax: xxBitCrack.exe [OPTIONS] [TARGETS]

    Where [TARGETS] are one or more Bitcoin addresses.

    xxBitCrack.exe 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
  2. Optimize performance by tuning blocks, threads, and points

    master

    GPU performance is affected by three main parameters. Tuning these can increase the keys per second (MKey/s):

    1. blocks (-b): Should be a multiple of the number of compute units on the device. Default is 32.
    2. threads (-t): The number of threads in a block. Must be a multiple of 32. Default is 256.
    3. points (-p): The number of keys each thread will process. Increasing this value increases performance asymptotically, though it causes the kernel to run longer.

    Example of manual tuning:

    xxBitCrack.exe -b 32 -t 256 -p 16 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
    xxBitCrack.exe -b 32 -t 256 -p 16 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
  3. Build BitCrack on Windows

    master

    Dependencies

    • Visual Studio 2019
    • For CUDA: CUDA Toolkit 10.1
    • For OpenCL: An OpenCL SDK (included in CUDA toolkit)

    Build Steps

    1. Open the Visual Studio solution.
    2. To build for OpenCL: Build the clKeyFinder project.
    3. To build for CUDA: Build the cuKeyFinder project.

    Note: By default, NVIDIA OpenCL headers are used. You can configure the header and library path for OpenCL in the BitCrack.props property sheet.

  4. Use the BitCrack CLI

    master

    BitCrack is a command-line tool used to search for private keys corresponding to specific Bitcoin addresses. You can provide addresses directly as command-line arguments or read them from a file. The tool supports various hardware acceleration methods (CUDA/OpenCL) and allows fine-grained control over the keyspace, device parameters, and compression types.

    BitCrack [OPTIONS] [TARGETS]
    
    # Example: Search for a specific address using a specific device
    BitCrack --device 0 1A1zP1eP5QGefi2DMPTfS5ht1W58ieEtuv
    
    # Example: Search using a file of addresses
    BitCrack --in addresses.txt
  5. Search a specific keyspace range

    master

    You can use the --keyspace option to define exactly which private keys to search. This allows you to start at a specific key or define a specific range.

    To start at a specific private key:

    xxBitCrack.exe --keyspace 766519C977831678F0000000000 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH

    To search a specific range (e.g., from 80000000 to ffffffff):

    xxBitCrack.exe --keyspace 80000000:ffffffff 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
    xxBitCrack.exe --keyspace 80000000:ffffffff 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
  6. BitCrack CLI Reference

    master

    The following options are available for the BitCrack executable:

    • -i, --in FILE: Read addresses from FILE, one address per line. If FILE is -, read from stdin.
    • -o, --out FILE: Append found private keys to FILE, one per line.
    • -d, --device N: Use device with ID equal to N.
    • -b, --blocks BLOCKS: The number of CUDA blocks.
    • -t, --threads THREADS: Threads per block.
    • -p, --points NUMBER: Each thread will process NUMBER keys at a time.
    • --keyspace KEYSPACE: Specify the range of keys to search. Formats:
      • START:END: Start at START, end at END.
      • START:+COUNT: Start at START, end at START + COUNT.
      • :END: Start at key 1, end at END.
      • :+COUNT: Start at key 1, end at 1 + COUNT.
    • -c, --compressed: Search for compressed keys (default).
    • -u, --uncompressed: Search for uncompressed keys. Can be used with -c to search both.
    • --compression MODE: Specify mode: 'compressed', 'uncompressed', or 'both'.
    • --list-devices: List available devices.
    • --stride NUMBER: Increment by NUMBER.
    • --share M/N: Divide the keyspace into N equal sized shares, process the Mth share.
    • --continue FILE: Save/load progress from FILE.
    xxBitCrack.exe [OPTIONS] [TARGETS]
  7. BitCrack CLI Reference

    master

    The following command-line options are available for BitCrack:

    --help                  Display this message
    -c, --compressed        Use compressed points
    -u, --uncompressed    Use Uncompressed points
    --compression MODE      Specify compression where MODE is COMPRESSED or UNCOMPRESSED or BOTH
    -d, --device ID         Use device ID
    -b, --blocks N          N blocks
    -t, --threads N         N threads per block
    -p, --points N          N points per thread
    -i, --in FILE           Read addresses from FILE, one per line
    -o, --out FILE          Write keys to FILE
    -f, --follow            Follow text output
    --list-devices          List available devices
    --keyspace KEYSPACE     Specify the keyspace (START:END, START:+COUNT, etc.)
    --stride N              Increment by N keys at a time
    --share M/N             Divide the keyspace into N equal shares, process the Mth share
    --continue FILE         Save/load progress from FILE
  8. Manage progress with --continue

    master

    BitCrack can save its current state to a checkpoint file and resume from that state later. This prevents losing progress if the process is interrupted. Use --continue FILE to point to a previously saved checkpoint file. The checkpoint file stores the current key, keyspace boundaries, device settings, and elapsed time.

    # To save progress (implicitly handled if --continue is provided and running)
    # To resume from a checkpoint
    BitCrack --continue checkpoint.txt 1A1zP1eP5QGefi2DMPTfS5ht1W58ieEtuv
  9. Configure the keyspace with --keyspace

    master

    The --keyspace option allows you to define the range of private keys to search. All values must be in hexadecimal format. Supported formats include:

    • START:END: A specific range.
    • START:+COUNT: From a start point for a specific number of keys.
    • START: From a start point to the end of the curve.
    • :END: From the beginning of the curve to an end point.
    • :+COUNT: The first N keys of the curve.
    # Example: Search from hex START to hex END
    BitCrack --keyspace 1000:2000
    
    # Example: Search from hex START for 500 keys
    BitCrack --keyspace 1000:+500
  10. Divide work using --share

    master

    To distribute a large keyspace across multiple machines or processes, use the --share M/N option. This divides the current keyspace into N equal shares and instructs BitCrack to process only the M-th share. This is useful for parallelizing searches across different devices or nodes.

    # Example: Process the 1st share out of 4 total shares
    BitCrack --share 1/4 1A1zP1eP5QGefi2DMPTfS5ht1W58ieEtuv