forked from mannkind/bit2factor.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
312 lines (289 loc) · 17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!doctype html>
<html lang="en">
<head>
<!--
Donation Address: 1MnKnd2t7Tfpy1Cs8bm5DraC9HzrHmHoso
Notice of Copyrights and Licenses:
***********************************
The bit2factor.org project, software and embedded resources are copyright bit2factor.org.
The individual copyrights are included throughout the document along with their licenses.
Included JavaScript libraries are separated with HTML script tags.
Summary of JavaScript functions with a redistributable license:
JavaScript License
******************** ***************
Array.prototype.map Public Domain
window.Crypto BSD License
window.Crypto.Scrypt MIT License
window.SecureRandom BSD License
window.EllipticCurve BSD License
window.BigInteger BSD License
window.Bitcoin MIT License
window.Bitcoin.BIP38 MIT License
Framework License
******************* **************
Boostrap Apache License
The bit2factor.org software is available under The MIT License (MIT)
Copyright (c) 2013 bit2factor.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GitHub Repository: https://github.com/mannkind/bit2factor.org
-->
<title>Two-Factor Bitcoins</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet"></link>
<link href="css/bootstrap-responsive.min.css" rel="stylesheet"></link>
<link href="css/bit2factor.css" rel="stylesheet"></link>
<script src="js/array.map.js" type="text/javascript"></script>
<script src="js/crypto.js" type="text/javascript"></script>
<script src="js/secure.random.js" type="text/javascript"></script>
<script src="js/elliptic.curve.js" type="text/javascript"></script>
<script src="js/bigint.js" type="text/javascript"></script>
<script src="js/bitcoin.base58.js" type="text/javascript"></script>
<script src="js/bitcoin.address.js" type="text/javascript"></script>
<script src="js/bitcoin.ecsa.js" type="text/javascript"></script>
<script src="js/bitcoin.bip38.js" type="text/javascript"></script>
<script src="js/crypto.scrypt.js" type="text/javascript"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/bit2factor.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="row"> </div>
<div class="row">
<div class="span12">
<h2>Two-Factor Bitcoin</h2>
<p>The <em>only</em> way to do a two-party transaction between untrusted peers (an implementation of <a href="https://en.bitcoin.it/wiki/BIP_0038">BIP38</a>)</p>
<p>If you're looking for to do Bitcoin Escrow, checkout <a href="http://www.bitescrow.org">bitescrow.org</a></p>
<div class="accordion" id="accordion2">
<h3>Two-Party Escrow</h3>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
Generate Intermediate Code
</a>
</div>
<div id="collapseOne" class="accordion-body collapse in">
<div class="accordion-inner">
<p>An intermediate code allows the other party to generate an encrypted private key based on your passphrase without them actually knowing the passphrase.</p>
<p>Typically the person receiving the coins is the person to generate the intermediate code.</p>
<br />
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="rec-genint-passphrase">Passphrase</label>
<div class="controls">
<input autocomplete="off" id="rec-genint-passphrase" placeholder=" Enter a passphrase" class="span8" />
</div>
</div>
<div class="form-actions">
<button id="rec-genint-gen" class="btn btn-primary" data-loading-text=" ... Generating ... ">Generate Intermediate Code</a>
</div>
<div class="control-group">
<label class="control-label" for="rec-genint-intermediate">Intermediate Code</label>
<div class="controls">
<input id="rec-genint-intermediate" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
<p class="muted">Provide the other party the intermediate code once it has been generated.</p>
</div>
</form>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
Generate Address, Confirmation Code & Private Key
</a>
</div>
<div id="collapseTwo" class="accordion-body collapse">
<div class="accordion-inner">
<p>Generate the encrypted private key using the intermediate code that you were given by the other party.</p>
<p>You will <strong>lose access to the coins</strong> unless the other party provides you with the passphrase to the encrypted private key.</p>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="send-gencon-intermediate">Intermediate Code</label>
<div class="controls">
<input id="send-gencon-intermediate" placeholder=" Enter the intermediate code" class="span8" />
</div>
</div>
<div class="form-actions">
<button id="send-gencon-enc" class="btn btn-primary" data-loading-text=" ... Generating ... ">Generate All</a>
</div>
<div class="control-group">
<label class="control-label" for="send-gencon-address">Bitcoin Address</label>
<div class="controls">
<input id="send-gencon-address" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="send-gencon-confirmation">Confirmation Code</label>
<div class="controls">
<input id="send-gencon-confirmation" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="send-gencon-privatekey">Encrypted Private Key</label>
<div class="controls">
<input id="send-gencon-privatekey" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
<p class="muted">Provide the address and confirmation code to the other party once they have been generated. Once the other party had verified the address using the confirmation code, you can send the coins to the address without fear of the other party getting access to the coins before the trade is complete.</p>
<p class="muted"><strong>Do not</strong> give the other party the encypted key until you are ready to release the coins.</p>
</form>
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
Verify Confirmation Code
</a>
</div>
<div id="collapseThree" class="accordion-body collapse">
<div class="accordion-inner">
<p>Use your original passphrase and the confirmation code provided by the other party to verify that the address generated was based on your passphrase.</p>
<p>Once verified, the other party can send coins to the address. You will not have access to the coins until the other party sends you the encrypted private key.</p>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="rec-vercon-passphrase">Passphrase</label>
<div class="controls">
<input autocomplete="off" id="rec-vercon-passphrase" placeholder=" Enter your passphrase" class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="rec-vercon-confirmation">Confirmation Code</label>
<div class="controls">
<input autocomplete="off" id="rec-vercon-confirmation" placeholder=" Enter the confirmation code" class="span8" />
</div>
</div>
<div class="form-actions">
<button id="rec-vercon-verify" class="btn btn-primary" data-loading-text=" ... Verifying ... ">Verify Confirmation Code</a>
</div>
</form>
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseFour">
Decrypt Private Key
</a>
</div>
<div id="collapseFour" class="accordion-body collapse">
<div class="accordion-inner">
<p>Decrypt an encrypted private key using a passphrase.</p>
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="rec-decenc-passphrase">Passphrase</label>
<div class="controls">
<input autocomplete="off" id="rec-decenc-passphrase" placeholder=" Enter your passphrase" class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="rec-decenc-privatekey">Encrypted Private Key</label>
<div class="controls">
<input autocomplete="off" id="rec-decenc-privatekey" placeholder=" Enter the encrypted private key" class="span8" />
</div>
</div>
<div class="form-actions">
<button id="rec-decenc-decrypt" class="btn btn-primary" data-loading-text=" ... Decrypting ... ">Decrypt Private Key</a>
</div>
<div class="control-group">
<label class="control-label" for="rec-decenc-address">Address</label>
<div class="controls">
<input autocomplete="off" id="rec-decenc-address" placeholder=" ... not yet decrypted ... " class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="rec-decenc-wif">Private Key (WIF)</label>
<div class="controls">
<input autocomplete="off" id="rec-decenc-wif" placeholder=" ... not yet decrypted ... " class="span8" />
</div>
</div>
</form>
</div>
</div>
</div>
<hr />
<h3>Encrypted Private Keys</h3>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseFive">
Generate & Encrypt Private Key
</a>
</div>
<div id="collapseFive" class="accordion-body collapse">
<div class="accordion-inner">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="encgen-passphrase">Passphrase</label>
<div class="controls">
<input autocomplete="off" id="encgen-passphrase" placeholder=" Enter your passphrase" class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="encgen-uprivkey">Private Key</label>
<div class="controls">
<input autocomplete="off" id="encgen-uprivkey" placeholder=" (Optional) Enter a Private Key to Encrypt" class="span8" />
</div>
</div>
<div class="form-actions">
<button id="encgen-encrypt" class="btn btn-primary" data-loading-text=" ... Generating ... ">Generate & Encrypt Private Key</a>
</div>
<div class="control-group">
<label class="control-label" for="encgen-address">Bitcoin Address</label>
<div class="controls">
<input id="encgen-address" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="encgen-privkey">Encrypted Key</label>
<div class="controls">
<input id="encgen-privkey" placeholder=" ... not yet generated ... " class="span8" />
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="span12">
<hr />
<p><small>
<span class="pull-left">
<a href="https://blockchain.info/address/1MnKnd2t7Tfpy1Cs8bm5DraC9HzrHmHoso">Donate: 1MnKnd2t7Tfpy1Cs8bm5DraC9HzrHmHoso</a>
</span>
<span class="pull-right">
<a href="https://github.com/mannkind/bit2factor.org">View Source Code</a>
</span>
</small></p>
</div>
</div>
</div>
<div id="rec-vercon-modal" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Verification Result</h3>
</div>
<div class="modal-body">
<p id="rec-vercon-verification"> ... not yet verified ... </p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>
</body>
</html>