Skip to content

Commit 5ec5221

Browse files
committed
Add a README and warning.
1 parent 4d33709 commit 5ec5221

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
pairgen
2+
=======
3+
4+
Pairgen is a tool for generating pairs of "similar" Bitcoin addresses. For
5+
example, generate a pair of addresses that share the first *80* bits:
6+
7+
$ pairgen 80
8+
...
9+
WIF[1] = ...
10+
WIF[2] = ...
11+
12+
shared = 20chars
13+
hash160[1] = 53e1f4f491509f9012bd901be5147447f770018b
14+
hash160[2] = 53e1f4f491509f9012bd825ce1e9599b253188ef
15+
16+
shared = 15chars
17+
addr[1] = 18eXmgR5Svoqqa6PaYVrKvbH6hvrp5xe3A
18+
addr[2] = 18eXmgR5Svoqqa6JXSMmbNaD4Cs5ThcV1P
19+
20+
Pairgen exploits the so-called [birthday
21+
attack](http://en.wikipedia.org/wiki/Birthday_attack) to find long (partial)
22+
collisions. Pairgen's algorithm is similar to other tools such as
23+
[MD5CRK](http://en.wikipedia.org/wiki/MD5CRK).
24+
25+
Warnings!
26+
---------
27+
28+
Pairgen is experimental software.
29+
30+
**You must independently verify all generated addresses before use!** Never
31+
send Bitcoins to a generated address before uploading (and verifying) the
32+
private keys using other wallet software.
33+
34+
Usage
35+
-----
36+
37+
The basic usage of pairgen is:
38+
39+
pairgen bits
40+
41+
where *bits* is the number of shared bits.
42+
43+
The advanced usage of pairgen is:
44+
45+
pairgen [--job=JOB] [--message=MESSAGE] bits [distinguished-bits]
46+
47+
The *job* option tells pairgen to store state in the files *job.secret*,
48+
*job.public* and *job.work*. Jobs can be stopped and restarted, which is
49+
useful for large runs.
50+
51+
The *message* option allows the user to specify the message used for
52+
signature generation.
53+
54+
The *distinguished-bits* determines how granular the work is.
55+
56+
Hacking
57+
-------
58+
59+
* *More work is good*: more work = higher chance of finding a solution
60+
(unlike vanitygen).
61+
* *Reuse work*: The *job* option can be used to find multiple solutions.
62+
Restart pairgen (with the same command-line arguments) to find the next
63+
solution. This will reuse work, so finding more solutions becomes easier
64+
over time.
65+
* *Split work*: The *job.public* file can safely be distributed. You can
66+
generate work on multiple machines, and combine the work by concatenating
67+
the resulting *job.work* files.
68+
69+
BUGS
70+
----
71+
72+
The *job.secret* file is not encrypted in any way.
73+
74+
If a worker thread finds a loop with no distinguished point, it will loop
75+
forever. Currently pairgen just relies on this being unlikely.
76+
77+
LICENSE
78+
-------
79+
80+
The new pairgen code is GPLv3. Pairgen incorporates other code (e.g.
81+
libsecp256k1) distributed under other compatible open source licenses.
82+

pairgen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,7 @@ int main(int argc, char **argv)
15081508
putchar(addr1[i]);
15091509
set_bold(false);
15101510
printf("%s\n\n", addr1+share);
1511+
printf("warning: verify the keys/addresses before use!\n\n");
15111512

15121513
return 0;
15131514
}

0 commit comments

Comments
 (0)