Skip to content

Commit 82b085d

Browse files
author
brichard19
committed
Updated README
1 parent 5700dfc commit 82b085d

File tree

1 file changed

+71
-29
lines changed

1 file changed

+71
-29
lines changed

README.md

Lines changed: 71 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,151 @@
11
# BitCrack
22

3-
A set of tools for brute-forcing Bitcoin private keys. Currently the project requires a CUDA GPU. The main purpose of this project is to contribute to the effort of solving the [Bitcoin puzzle transaction](https://blockchain.info/tx/08389f34c98c606322740c0be6a7125d9860bb8d5cb182c02f98461e5fa6cd15): A transaction with 32 addresses that become increasingly difficult to crack.
3+
A tool for brute-forcing Bitcoin private keys. The main purpose of this project is to contribute to the effort of solving the [Bitcoin puzzle transaction](https://blockchain.info/tx/08389f34c98c606322740c0be6a7125d9860bb8d5cb182c02f98461e5fa6cd15): A transaction with 32 addresses that become increasingly difficult to crack.
44

5-
Currently this project is CUDA only, but I would love to bring it to other architectures if there is enough interest in the project.
65

7-
## Build dependencies
6+
### Using BitCrack
87

9-
Visual Studio 2017
8+
#### Usage
109

11-
CUDA Toolkit 9.2
10+
Use `cuBitCrack.exe` for CUDA devices and `clBitCrack.exe` for OpenCL devices.
1211

12+
Note for OpenCL builds: the .cl files must be in the same directory as clBitCrack.exe, as these are compiled on the fly.
1313

14-
## Using the tools
15-
16-
### Usage
1714
```
18-
BitCrack.exe [OPTIONS] [TARGETS]
15+
xxBitCrack.exe [OPTIONS] [TARGETS]
1916
2017
Where [TARGETS] are one or more Bitcoin address
2118
2219
Options:
2320
2421
-i, --in FILE
25-
Read addresses from FILE, one address per line. If FILE is "-" then stdin is read.
22+
Read addresses from FILE, one address per line. If FILE is "-" then stdin is read
2623
2724
-o, --out FILE
28-
Append private keys to FILE, one per line.
25+
Append private keys to FILE, one per line
2926
3027
-d, --device N
31-
Use device with ID equal to N. Run CudaInfo.exe to see a list of available devices.
28+
Use device with ID equal to N
3229
3330
-b, --blocks BLOCKS
34-
The number of CUDA blocks.
31+
The number of CUDA blocks
3532
3633
-t, --threads THREADS
37-
Threads per block.
34+
Threads per block
3835
3936
-p, --per-thread NUMBER
40-
Each thread will process NUMBER keys at a time.
37+
Each thread will process NUMBER keys at a time
4138
4239
-s, --start KEY
43-
Start the search at KEY. KEY is any valid private key in hexadecimal format.
40+
Start the search at KEY. KEY is any valid private key in hexadecimal format
4441
4542
-r, --range RANGE
46-
Number of keys to search.
43+
Number of keys to search
4744
4845
-c, --compressed
49-
Search for compressed keys (default). Can be used with -u to also search uncompressed keys.
46+
Search for compressed keys (default). Can be used with -u to also search uncompressed keys
5047
5148
-u, --uncompressed
52-
Search for uncompressed keys. Can be used with -c to search compressed keys.
49+
Search for uncompressed keys, can be used with -c to search compressed keys
5350
51+
--list-devices
52+
List available devices
5453
5554
5655
```
5756

58-
### Examples
57+
#### Examples
5958

6059

6160
The simplest usage, the keyspace will begin at 0, and the CUDA parameters will be chosen automatically
6261
```
63-
BitCrack.exe 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
62+
xxBitCrack.exe 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
6463
```
6564

6665
Multiple keys can be searched at once with minimal impact to performance. Provide the keys on the command line, or in a file with one address per line
6766
```
68-
BitCrack.exe 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH 15JhYXn6Mx3oF4Y7PcTAv2wVVAuCFFQNiP 19EEC52krRUK1RkUAEZmQdjTyHT7Gp1TYT
67+
xxBitCrack.exe 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH 15JhYXn6Mx3oF4Y7PcTAv2wVVAuCFFQNiP 19EEC52krRUK1RkUAEZmQdjTyHT7Gp1TYT
6968
```
7069

7170
To start the search at a specific private key, use the `-s` option:
7271

7372
```
74-
BitCrack.exe -s 6BBF8CCF80F8E184D1D300EF2CE45F7260E56766519C977831678F0000000000 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
73+
xxBitCrack.exe -s 6BBF8CCF80F8E184D1D300EF2CE45F7260E56766519C977831678F0000000000 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
7574
```
7675

7776

7877
Use the `-b,` `-t` and `-p` options to specify the number of blocks, threads per block, and keys per thread.
7978
```
80-
BitCrack.exe -b 32 -t 256 -p 16 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
79+
xxBitCrack.exe -b 32 -t 256 -p 16 1FshYsUh3mqgsG29XpZ23eLjWV8Ur3VwH
8180
```
8281

8382
Use the `-r` or `--range` option to specify how many keys to search before stopping. For instance, to search up to 1 billion keys from the starting key:
8483

8584
```
86-
BitCrack.exe -s 6BBF8CCF80F8E184D1D300EF2CE45F7260E56766519C977831678F0000000000 -r 1000000000
85+
xxBitCrack.exe -s 6BBF8CCF80F8E184D1D300EF2CE45F7260E56766519C977831678F0000000000 -r 1000000000
8786
```
8887

8988
Note:
9089

9190
Integer values can be specified in decimal (e.g. `123`) or in hexadecimal using the `0x` prefix or `h` suffix (e.g. `0x1234` or `1234h`)
9291

9392

94-
## Choosing the right CUDA parameters
93+
### Choosing the right parameters for your device
94+
95+
GPUs have many cores. Work for the cores is divided into blocks. Each block contains threads.
9596

9697
There are 3 parameters that affect performance: blocks, threads per block, and keys per thread.
9798

9899

99-
`blocks:` Should be a multiple of the number of compute units on the device. The default is 16 times the number of compute units.
100+
`blocks:` Should be a multiple of the number of compute units on the device. The default is 32.
100101

101102
`threads:` The number of threads in a block. This must be a multiple of 32. The default is 256.
102103

103-
`Keys per thread:` The performance (keys per second) increases asymptotically with this value. The default is 16. Increasing this value will cause the kernel to run longer, but more keys will be processed.
104+
`Keys per thread:` The number of keys each thread will process. The performance (keys per second)
105+
increases asymptotically with this value. The default is 32. Increasing this value will cause the
106+
kernel to run longer, but more keys will be processed.
107+
108+
109+
### Build dependencies
110+
111+
Visual Studio 2017 (if on Windows)
112+
113+
For CUDA: CUDA Toolkit 9.2
114+
115+
For OpenCL: An OpenCL SDK
116+
117+
118+
### Building in Windows
119+
120+
Open the Visual Studio solution.
121+
122+
Build the `clKeyFinder` project for an OpenCL build.
123+
124+
Build the `cuKeyFinder` project for a CUDA build.
104125

126+
Note: By default the NVIDIA OpenCL headers are used. You can set the header and library path for
127+
OpenCL in the `BitCrack.props` property sheet.
128+
129+
### Building in Linux
130+
131+
Using `make`:
132+
133+
Build CUDA:
134+
```
135+
make BUILD_CUDA=1
136+
```
137+
138+
Build OpenCL:
139+
```
140+
make BUILD_OPENCL=1
141+
```
142+
143+
Or build both:
144+
```
145+
make BUILD_CUDA=1 BUILD_OPENCL=1
146+
```
105147

106-
## Supporting this project
148+
### Supporting this project
107149

108150
If you find this project useful and would like to support it, consider making a donation. Your support is greatly appreciated!
109151

0 commit comments

Comments
 (0)