forked from area/brainwallet.github.io
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
802 lines (774 loc) · 51.9 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Brainwallet - JavaScript Client-Side Bitcoin Address Generator</title>
<meta content="Client-side Bitcoin address and deterministic wallets generator, Base58 converter, transaction builder, signing and verifying messages with Bitcoin address" name="description" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta content="bitcoin address generator" name="description" />
<meta content="brainwallet" name="author" />
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/brainwallet.css" rel="stylesheet" />
<!--<script src="js/jquery.js"></script>-->
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bitcoinjs-min.js"></script>
<script src="js/web3-eth-accounts.js">//generate Ethereum address from the secret exponent hex. Sign messages and verify sinature.</script>
<script src="js/qrcode.js"></script>
<script src="js/rfc1751.js"></script>
<script src="js/mnemonic.js"></script>
<script src="js/armory.js"></script>
<script src="js/electrum.js"></script>
<script src="js/tx.js"></script>
<script src="js/bitcoinsig.js"></script>
<script src="js/secure-random.js"></script>
<script src="js/asn1.js"></script>
<script src="js/brainwallet.js"></script>
</head>
<body onclick="rng_seed_time();" onkeypress="rng_seed_time();">
<header class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-target=".bs-navbar-collapse" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span> <span class="icon-bar"> </span> <span class="icon-bar"> </span> <span class="icon-bar"> </span></button> <a class="navbar-brand" href="/brainwallet.github.io/">Brainwallet</a>
</div>
<nav class="collapse navbar-collapse bs-navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li><a href="https://bitcointalk.org/index.php?topic=1148611.0" target="_blank" style="font-weight:bold;font-size:12pt;">Important Security Update!</a></li>
<li class="active"><a data-toggle="tab" href="#generator" id="tab-gen">Generator</a></li>
<li><a data-toggle="tab" href="#chains" id="tab-chains">Chains</a></li>
<li><a data-toggle="tab" href="#tx" id="tab-tx">Transactions</a></li>
<li><a data-toggle="tab" href="#converter" id="tab-converter">Converter</a></li>
<li><a data-toggle="tab" href="#sign" id="tab-sign">Sign</a></li>
<li><a data-toggle="tab" href="#verify" id="tab-verify">Verify</a></li>
<li><a data-toggle="tab" href="#xor" id="tab-xor">XOR</a></li>
<li><a data-toggle="tab" href="#crypt" id="tab-crypt" title="Encrypt/Decrypt keyfile for OpenSSL, Truecrypt">Key-file</a></li>
<li><a data-toggle="tab" href="#t_addr" id="tab-t_addr" title="Convert transparent address (Z-Cash)">T-addr</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown" id="crCurrency">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="crSelect"><span id="crName">BTC</span> <b class="caret"> </b></a>
<ul class="dropdown-menu scrollable-menu">
<!-- prefix bytes, usually contains in the source code of bitcoin-based altcoins, in "/src/chainparams.cpp", strMessageMagic value, for signing and verifying the message, usually contains in "/src/validation.cpp"-->
<!-- data target is "address_version,privatekey_version (optional)", privatekey_version is address_version+128 by default -->
<!-- data target is "compressed/uncompressed,address_version,privatekey_version (optional)", privatekey_version is address_version+128 by default -->
<!--
The attribute strMessageMagic="VALUE" contains magic prefix for signing message and verify signed message in qt wallets.
After parsing, '\n' will be escaped as "\\n"
this value you can find in the source code for each coin in the files main.cpp, validation.cpp or another...
-->
<!--To using new SegWit address with bytes [0x00, 0x14] add title="SegWit address" to the tag a (see tooltips)-->
<li><a data-target="0x00" href="http://blockchain.info"><span class="pull-right">BTC</span>Bitcoin</a></li>
<li><a data-target="uncompressed, 0x00, 0x00" strMessageMagic="\x19Ethereum Signed Message:\n" href="http://etherscan.io/"><span class="pull-right">ETH</span>Ethereum</a></li>
<!--
The data will be UTF-8 HEX decoded and enveloped as follows:
"\x19Ethereum Signed Message:\n" + message.length + message
and hashed using keccak256.
-->
<li><a data-target="compressed, 0x19, 0xbf" strMessageMagic="Signatum Signed Message:\n" href="http://explorer.signatum.io"><span class="pull-right">SIGT</span>Signatum</a></li>
<li><a data-target="uncompressed,0x34" href="#generator"><span class="pull-right">611</span>SixEleven</a></li>
<li><a data-target="compressed, 0x21, 0x80" href="http://explorer.signatum.io"><span class="pull-right">EMC</span>EmerCoin</a></li>
<li><a data-target="compressed,0x47, 0x80" strMessageMagic="Vertcoin Signed Message:\n" href="https://bchain.info/vtc/"><span class="pull-right">VTC</span>Vertcoin</a></li>
<!--According the data of Bitcoin Gold scripts for web-wallet "coinbin-master" - public key byte for BTG is 0x26, and all keys - compressed -->
<li><a data-target="uncompressed,0x4c,0xcc" strMessageMagic="DarkCoin Signed Message:\n" href="https://explorer.dash.org/chain/Dash"><span class="pull-right">DASH</span>Dash</a></li>
<li><a data-target="compressed,0x26" href="https://btgblocks.com/"><span class="pull-right">BTG</span>Bitcoin Gold (G)</a></li>
<li><a data-target="compressed,0x17" href="https://btgblocks.com/" title="SegWit address"><span class="pull-right">BTG</span>Bitcoin Gold (A)</a></li>
<li><a data-target="0x17" href="https://chainz.cryptoid.info/arch/address.dws"><span class="pull-right">ARCH</span>Archcoin</a></li>
<li><a data-target="0x55" href="http://bitmark.co:3000"><span class="pull-right">BTM</span>Bitmark</a></li>
<li><a data-target="0x19" href="http://blackco.in"><span class="pull-right">BC</span>Blackcoin</a></li>
<li><a data-target="0x3C" href="http://explorebtcd.info:3000"><span class="pull-right">BTCD</span>BitcoinDark</a></li>
<li><a data-target="0x0B" href="http://explorer.cryptogenicbullion.org:2750"><span class="pull-right">CGB</span>Cryptogenic</a></li>
<li><a data-target="0x89,0x85" href="http://khashier.com"><span class="pull-right">CLAM</span>ClamCoin</a></li>
<li><a data-target="0x1E" href="http://www.chainbrowser.com/datacoin"><span class="pull-right">DTC</span>Datacoin</a></li>
<li><a data-target="0x00" href="http://d.evco.in/abe"><span class="pull-right">DVC</span>Devcoin</a></li>
<li><a data-target="0x1E" href="http://dgc.cryptocoinexplorer.com"><span class="pull-right">DGC</span>Digitalcoin</a></li>
<li><a data-target="0x1E" href="http://dogechain.info"><span class="pull-right">DOGE</span>Dogecoin</a></li>
<li><a data-target="0x0E" href="http://ftc.cryptocoinexplorer.com"><span class="pull-right">FTC</span>Feathercoin</a></li>
<li><a data-target="0x26" href="http://gmc.cryptocloudhosting.org:3001"><span class="pull-right">GMC</span>GameCredits</a></li>
<li><a data-target="0x66" href="http://exploretheblocks.com:2750"><span class="pull-right">IFC</span>Infinitecoin</a></li>
<li><a data-target="0x8A" href="http://d.evco.in/abe"><span class="pull-right">IXC</span>Ixcoin</a></li>
<li><a data-target="0x30" strMessageMagic="Litecoin Signed Message:\n" href="http://explorer.litecoin.net"><span class="pull-right">LTC</span>Litecoin</a></li>
<li><a data-target="0x32" href="http://explore.marscoin.org"><span class="pull-right">MRS</span>Marscoin</a></li>
<li><a data-target="0x32" href="http://www.chainbrowser.com/memorycoin"><span class="pull-right">MMC</span>Memorycoin</a></li>
<li><a data-target="0x32" href="https://coinplorer.com/MEC"><span class="pull-right">MEC</span>Megacoin</a></li>
<li><a data-target="0x33" href="http://localhost"><span class="pull-right">MINT</span>MintCoin</a></li>
<li><a data-target="0x34" href="http://explorer.dot-bit.org"><span class="pull-right">NMC</span>Namecoin</a></li>
<li><a data-target="0x08" href="http://nvc.cryptocoinexplorer.com"><span class="pull-right">NVC</span>Novacoin</a></li>
<li><a data-target="0x37" href="http://ppc.cryptocoinexplorer.com"><span class="pull-right">PPC</span>Peercoin</a></li>
<li><a data-target="0x37" href="http://localhost"><span class="pull-right">PAC</span>PandaCoin</a></li>
<li><a data-target="0x17" href="http://primecoin.org"><span class="pull-right">XPM</span>Primecoin</a></li>
<li><a data-target="0x38" href="http://btsblock.com"><span class="pull-right">PTS</span>Protoshares</a></li>
<li><a data-target="0x3A" href="http://quarkexplorer.com"><span class="pull-right">QRK</span>Quarkcoin</a></li>
<li><a data-target="0x3D" href="http://live.reddcoin.com"><span class="pull-right">RDD</span>Reddcoin</a></li>
<li><a data-target="0x3F" href="http://explorer.shadow.cash/"><span class="pull-right">SDC</span>ShadowCash</a></li>
<li><a data-target="0x00" href="http://trc.cryptocoinexplorer.com"><span class="pull-right">TRC</span>Terracoin</a></li>
<li><a data-target="0x30" href="http://tacochain.info"><span class="pull-right">TC0</span>Tacocoin</a></li>
<li><a data-target="0x6F" href="http://blockexplorer.com/testnet"><span class="pull-right">TEST</span>Testnet</a></li>
<li><a data-target="0x47" href="http://explorer.vertcoin.org"><span class="pull-right">VTC</span>Vertcoin</a></li>
<li><a data-target="0x49" href="http://wdc.cryptocoinexplorer.com"><span class="pull-right">WDC</span>Worldcoin</a></li>
<li><a data-target="0x50" href="http://bit.usr.sh:2750"><span class="pull-right">ZET</span>Zetacoin</a></li>
<li><a class="selected" data-target="compressed, 0x26, 0xa6" strMessageMagic="Geertcoin Signed Message:\n" href="https://prohashing.com/explorer/Geertcoin/"><span class="pull-right">GEERT</span>GeertCoin</a></li>
<li><a data-target="uncompressed, 0x1a, 0x9a" strMessageMagic="Beachcoin Signed Message:\n" href="https://prohashing.com/explorer/Beachcoin/"><span class="pull-right">SAND</span>BeachCoin</a></li>
<li><a data-target="compressed, 0x07, 0xc6" strMessageMagic="DarkCoin Signed Message:\n" href="https://miner-control.de/explorer/CGUR"><span class="pull-right">CGUR</span>AllCoinGuru</a></li>
<li><a data-target="uncompressed, 39, 167" strMessageMagic = "Guncoin Signed Message:\n" href="https://chainz.cryptoid.info/gun/"><span class="pull-right">GUN</span>Guncoin</a></li>
<li><a data-target="compressed, 0, 128" strMessageMagic = "DarkNet Signed Message:\n" href="http://galleon.live"><span class="pull-right">GALE</span>Galleoncoin</a></li>
<li><a data-target="compressed, 25, 0x99" strMessageMagic = "safechain Signed Message:\n" href="https://fpool.eu/explorer/SFC/"><span class="pull-right">SFC</span>SafeChain</a></li>
<li><a data-target="" href="https://waveswallet.io/"><span class="pull-right">WAVES</span>Waves</a></li>
<!--test
<li><a data-target="" href=""><span class="pull-right">TEST1</span>0</a></li>
<li><a data-target="compressed" href="#generator"><span class="pull-right">TEST2</span>1</a></li>
<li><a data-target="uncompressed,0x00" href="#generator"><span class="pull-right">TEST3</span>1,2</a></li>
<li><a data-target="0x55,0x56" href="#generator"><span class="pull-right">TEST4</span>2,3</a></li>
<li><a data-target="uncompressed,0x00,0x80" href="#generator"><span class="pull-right">TEST5</span>1,2,3</a></li>
-->
</ul></li>
</ul>
</nav>
</div>
</header>
<div class="container">
<div class="tab-content">
<!-- Generator -->
<div class="tab-pane fade in active" id="generator">
<form action="/" class="form-horizontal" method="get">
<fieldset>
<legend>Generator: <div style="display:inline;" id="coin_name"></div></legend>
<div class="form-group">
<label class="col-lg-2 control-label">Coin parameters: </label>
<div class="col-lg-10 controls">
<div class="row">
<div class="col-xs-6" title="Coin name" id="altcoin_name"></div>
<div class="col-xs-6" title="Trading ticker on the stock exchanges." id="ticker"></div>
<div class="col-xs-6" title="Public Key Version for this coin" id="PubVer"></div>
<div class="col-xs-6" title="Compressed or uncompressed private key and addressed for this coin?" id="compressed"></div>
<div class="col-xs-6" title="Private Key Version for this coin" id="PrivVer"></div>
<a class="col-xs-6" title="Link to block-explorer site for this coin" id="block_explorer"></a>
<div class="col-xs-6" title="Magic prefix for signing and verify signed message" id="strMessageMagic"></div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="from_pass">Get Address From</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="gen_from">
<label class="btn btn-default active" title="Single SHA256"><input id="from_pass" name="gen_from" type="radio" checked/>Passphrase</label>
<label class="btn btn-default" title="Hex-encoded"><input id="from_hash" name="gen_from" type="radio" />Secret Exponent</label>
<label class="btn btn-default" title="Base58-encoded."><input id="from_sec" name="gen_from" type="radio" />Private Key</label>
<label class="btn btn-default" title="DER-encoded"><input id="from_der" name="gen_from" type="radio" />ASN.1 Key</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="pass">Passphrase</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="pass" placeholder="Long sentence that does not appear in songs or literature. SHA256 used as private key. Should not be empty!" type="password" autofocus/>
<span class="input-group-btn">
<button id="togglePass" class="btn btn-info" type="button">TEXT</button>
</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="hash" id="hash_random_seed_form">Hash of random_seed</label>
<div class="col-lg-10 controls">
<input class="form-control" id="hash_random_seed" maxlength="64" readonly="readonly" type="text" spellcheck="false" title="SHA256-hash of random_seed value that was specified in brainwallet.js on the host. Using for XOR button." type="text"/>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="hash">Passphrase hash</label>
<div class="col-lg-10 controls">
<input class="form-control" id="hash_passphrase" maxlength="64" readonly="readonly" type="text" spellcheck="false" title="SHA-256 hash of passphrase" type="text"/>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="hash">Secret Exponent</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="hash" maxlength="64" readonly="readonly" type="text" XOR="true"
title="256-bit ECDSA private key.
SHA256(Passphrase) or XOR this to SHA256(random_seed).
You can also use hash of this value.
But will be better to press 'secure random' button."
type="text"/>
<div class="input-group-btn">
<button class="btn btn-default" id="genRandom" title="Uses cryptographically-strong window.crypto. Disabled on unsupported browsers." type="button">Secure Random</button>
</div>
<span class="input-group-btn">
<button id="XOR" class="btn btn-info" type="button" title="Enable/Disable XOR to hash of random_seed">unXOR</button>
</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Point Conversion</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="gen_comp">
<label class="btn btn-default active" id="uncomp" name="uncomp" title="Uncompressed keys (reference client)">
<input name="uncompressed" type="radio" />Uncompressed</label>
<label class="btn btn-default" id="comp" name="comp" title="Compressed keys (introduced in 0.5.99)">
<input name="compressed" type="radio" />Compressed</label>
</div>
</div>
</div>
<div class="form-group" style="display:none">
<label class="col-lg-2 control-label" for="sec">Private Key</label>
<div class="col-lg-10 controls">
<input class="form-control" id="sec" readonly="readonly" spellcheck="false" title="Wallet Import Format (Base58Check of Secret Exponent)" type="text" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="addr">Address</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="addr" readonly="readonly" title="Bitcoin Address (Base58Check of HASH160)" type="text" />
<span class="input-group-btn">
<button id="SegWit_address" class="btn btn-info" type="button" title="Change address type. See tooltip description for address.">Default Address</button>
</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="genAddrQR">Address QR Code</label>
<div class="col-lg-4 controls">
<a href="#" id="genAddrURL" target="_blank" title="Click to view address history (external link)"><span id="genAddrQR"></span></a>
<span id='toggleKeyCode' class="btn btn-default">Show private key</span>
</div>
<div class="col-lg-3 controls">
<span id="genKeyQR" style="display:none"></span>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="der">ASN.1 Key</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="der" readonly="readonly" rows="5" title="ASN.1 DER-encoded ECDSA private key (OpenSSL)"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="pub">Public Key</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="pub" readonly="readonly" rows="2" title="SEC1-encoded ECDSA public key (OpenSSL)"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="h160">HASH160</label>
<div class="col-lg-10 controls">
<input class="form-control" id="h160" readonly="readonly" title="Hex-encoded address, RIPEMD160(SHA256(Public Key))" type="text" />
</div>
</div>
</fieldset>
</form>
</div><!-- Chains -->
<div class="tab-pane fade" id="chains">
<form action="/" class="form-horizontal" method="get">
<fieldset>
<legend>Chains</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="chType">Generation Method</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="chType">
<label class="btn btn-default active"><input id="armory" name="chType" type="radio" />Armory</label> <label class="btn btn-default"><input id="electrum" name="chType" type="radio" />Electrum</label>
</div> <span class="help-inline" id="chMsg"> </span>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" id="chain_hash_of_random_seed">Hash of random_seed</label>
<div class="input-group">
<input class="form-control" id="chhash_random_seed" maxlength="64" readonly="readonly" type="text" spellcheck="false" title="SHA256-hash of random_seed value that was specified in brainwallet.js on the host. Using for XOR button." type="text"/>
<span class="input-group-btn">
<button id="chXOR" class="btn btn-info" type="button" title="Enable/Disable XOR to hash of random_seed">XOR</button>
</span>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chRoot">Root Key</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="chRoot" maxlength="32" readonly="readonly" type="text" />
<div class="input-group-btn">
<button class="btn btn-default" id="chRandom" title="Uses cryptographically-strong window.crypto. Disabled on unsupported browsers." type="button" disabled="disabled">Secure Random</button>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chCode">Chain Code</label>
<div class="col-lg-10 controls">
<input class="form-control" id="chCode" maxlength="64" readonly="readonly" type="text" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chBackup">Paper Backup</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="chBackup" rows="4" spellcheck="false"
title="You can using only 2 strings of your paper backup if random_seed is specified correctly on this host.
To set up chaincode need paper backup with four strings."></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chRange">Primary Addresses</label>
<div class="col-lg-10 controls">
<input class="form-control" id="chRange" maxlength="3" type="text" value="10" />
</div>
</div>
<div class="form-group" title="Electrum specific, added to the end of the list">
<label class="col-lg-2 control-label" for="chChange">Change Addresses</label>
<div class="col-lg-10 controls">
<input class="form-control" disabled="disabled" id="chChange" maxlength="3" type="text" value="1" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chFormat">Wallet Format</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="chFormat">
<label class="btn btn-default active"><input id="csv" type="radio" />CSV</label> <label class="btn btn-default"><input id="json" type="radio" />JSON</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="chList">Chain</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="chList" readonly="readonly" rows="13" style="width:1000px"></textarea>
</div>
</div>
</fieldset>
</form>
</div><!-- Transactions -->
<div class="tab-pane fade" id="tx">
<form action="/" class="form-horizontal" method="get">
<fieldset>
<legend>Transactions</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="txFrom">Build Transaction From</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="txFrom">
<label class="btn btn-default active"><input id="txFromSec" name="txFrom" type="radio" />Private Key</label> <label class="btn btn-default"><input id="txFromJSON" name="txFrom" type="radio" />JSON Transaction</label> <label class="btn btn-default"><input id="txFromRaw" name="txFrom" type="radio" />Raw Transaction</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txSec">Private Key</label>
<div class="col-lg-10 controls">
<input class="form-control" id="txSec" spellcheck="false" type="text" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txAddr">Source Address</label>
<div class="col-lg-10 controls">
<div class="row">
<div class="col-xs-6">
<input class="form-control" id="txAddr" spellcheck="false" type="text" />
</div>
<div class="col-xs-3">
<span class="input-group"><span class="input-group-addon">BTC</span> <input class="form-control" id="txBalance" placeholder="0.00" readonly="readonly" type="text" /></span>
</div>
<div class="col-xs-2">
<button class="btn btn-default" data-target="#txUnspentForm" data-toggle="collapse" id="txToggle" type="button">Edit History</button>
</div>
</div>
</div>
</div>
<div class="collapse" id="txUnspentForm">
<div class="form-group">
<label class="col-lg-2 control-label" for="txBBE">Use History From</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="txType">
<label class="btn btn-default active"><input id="txBCI" name="txType" type="radio" />BlockChain Info</label> <label class="btn btn-default"><input id="txBBE" name="txType" type="radio" />Bitcoin Block Explorer</label>
</div> <button class="btn btn-default help-inline" id="txGetUnspent" type="button">Download</button>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txUnspent">Transaction History</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="txUnspent" rows="16"></textarea>
</div>
</div>
</div>
<div class="form-group txCC">
<label class="col-lg-2 control-label" for="txDest">Destination Address</label>
<div class="col-lg-10 controls">
<div class="row">
<div class="col-xs-6">
<input autocomplete="off" class="form-control txDest" spellcheck="false" id="txDest" type="text" />
</div>
<div class="col-xs-3">
<span class="input-group"><span class="input-group-addon">BTC</span> <input class="form-control" id="txValue" placeholder="0.00" type="text" /></span>
</div>
<div class="col-xs-3 help-inline">
<button class="btn btn-default" id="txAddDest" type="button">+</button> <button class="btn btn-default" disabled="disabled" id="txRemoveDest" type="button">–</button>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txJSON">JSON Transaction</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="txJSON" readonly="readonly" rows="12" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txHex">Raw Transaction</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="txHex" readonly="readonly" rows="5"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="txFee">Fee</label>
<div class="col-lg-10 controls">
<div class="input-group">
<span class="input-group-addon">BTC</span> <input class="form-control" id="txFee" type="text" value="0.0001" />
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10 controls">
<div class="input-group">
<button class="btn btn-default" id="txSign" title="Signatures require a random number which means signing the same data twice results in different sigs" type="button">Re-sign</button> <button class="btn btn-default" id="txSend" type="button">Send Transaction</button>
</div>
</div>
</div>
</fieldset>
</form>
</div><!-- Converter -->
<div class="tab-pane fade" id="converter">
<form action="/" class="form-horizontal" method="get">
<fieldset>
<legend>Converter
<button class="btn btn-info" type="button" id="tab-t_addr" title="Convert transparent address for Z-Cash" onclick="$('#tab-t_addr').trigger('click');">
Convert t-addr
</button>
</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="enc_from">Source Encoding</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="enc_from">
<label class="btn btn-default"><input id="from_hex" name="enc_from" type="radio" />Hex</label>
<label class="btn btn-default" title="String with decimal values of bytes, separated with comma.">
<input id="from_bytes" name="enc_from" type="radio"/>Bytes
</label>
<label class="btn btn-default active" title="Text with ASCII or UTF-8 encoding.">
<input id="from_text" name="enc_from" type="radio"/>Text
</label>
<label class="btn btn-default"><input id="from_bin" name="enc_from" type="radio" />Bin</label>
<label class="btn btn-default"><input id="from_dec" name="enc_from" type="radio" />Dec</label>
<label class="btn btn-default"><input id="from_base58" name="enc_from" type="radio" />Base58</label>
<label class="btn btn-default"><input id="from_base58check" name="enc_from" type="radio" />B58Check</label>
<label class="btn btn-default"><input id="from_base64" name="enc_from" type="radio" />Base64</label>
<label class="btn btn-default"><input id="from_rfc1751" name="enc_from" type="radio" />Rfc1751</label>
<label class="btn btn-default"><input id="from_mnemonic" name="enc_from" type="radio" />Poetry</label>
<label class="btn btn-default"><input id="from_rot13" name="enc_from" type="radio" />Rot13</label>
<label class="btn btn-default"><input id="from_easy16" name="enc_from" type="radio" />Easy16</label>
<label class="btn btn-default"><input id="from_raw" name="enc_from" type="radio" />RAW</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="enc_from">Source Text</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="src" rows="8" spellcheck="false"></textarea>
<a id="download_as_binary" style="display:none; float: right" href="" title="Download as binary. File with RAW-data." download="binary.txt">Download as binary</a>
<input id="upload_source_from_file" type='file' onchange='openFile(event, "src")'>
<div>
<span id="hint_from"> </span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="enc_from">Convert To</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="enc_to">
<label class="btn btn-default active"><input id="to_hex" name="enc_to" type="radio" />Hex</label>
<label class="btn btn-default" title="String with decimal values of bytes, separated with comma.">
<input id="to_bytes" name="enc_to" type="radio" />Bytes
</label>
<label class="btn btn-default" title="Text with ASCII or UTF-8 encoding.">
<input id="to_text" name="enc_to" type="radio"/>Text
</label>
<label class="btn btn-default"><input id="to_bin" name="enc_from" type="radio" />Bin</label>
<label class="btn btn-default"><input id="to_dec" name="enc_from" type="radio" />Dec</label>
<label class="btn btn-default"><input id="to_base58" name="enc_to" type="radio" />Base58</label>
<label class="btn btn-default"><input id="to_base58check" name="enc_to" type="radio" />B58Check</label>
<label class="btn btn-default"><input id="to_base64" name="enc_to" type="radio" />Base64</label>
<label class="btn btn-default"><input id="to_rfc1751" name="enc_to" type="radio" />Rfc1751</label>
<label class="btn btn-default"><input id="to_mnemonic" name="enc_to" type="radio" />Poetry</label>
<label class="btn btn-default"><input id="to_rot13" name="enc_to" type="radio" />Rot13</label>
<label class="btn btn-default"><input id="to_easy16" name="enc_to" type="radio" />Easy16</label>
<label class="btn btn-default" id="to_sha256"><input id="to_sha256" name="enc_to" type="radio" />SHA256</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="enc_from">Result</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="dest" readonly="readonly" rows="8"></textarea>
<div>
<span id="hint_to"> </span>
<a id="download-converted" style="display:none; float: right" href="" title="Download converted as text (UTF-8 encoded).">Download converted</a>
</div>
</div>
</div>
<div id="converter_permalink" align="center"></div>
</fieldset>
</form>
<hr />
</div>
<div class="tab-pane fade" id="t_addr">
<legend>Convert t-addreses (Z-Cash transparent address) [0x1c,0xb8]
<button class="btn btn-info" type="button" title="Transparent address for Z-Cash" onclick="$('#tab-converter').trigger('click');">
Back to converter
</button>
</legend>
<script src="js/t-addr_convertations.js"></script>
Address can be specified as get-parameter in url:
<a href="?address=t1f7qW3mmcsEeoFKyTmoX8gqrSNZUaDv6c6#t_addr">
this_page.html?address=t1f7qW3mmcsEeoFKyTmoX8gqrSNZUaDv6c6#t_addr
</a>
<br>
<br>
<style>
.liniya {display:inline-block;} /*style for display blocks in one line*/
</style>
<!-- form with input -->
<div class="form">
<div class="form-item">
b-address or t-address (without spaces and another symbols):
<input id="miner_address" size="50" placeholder="Enter t-address or b-address" class="search" type="text" />
<input type="submit" onclick="getValue();" />
</div>
<br>
<div class="liniya"><b>Validation address (checksum):</b> <p id="validation" class="liniya"></p></div>
<br>
<div class="liniya"><b>Converted address: </b><div id="resultaddr" class="liniya"></div></div>
</div>
<script>
//address from link -> to input
//input have id="miner_address" width size="50"
document.getElementById('miner_address').setAttribute('value', query_string["address"]);
//result of validation for address
document.getElementById('validation').innerHTML = validation;
//fill div by converted address
document.getElementById('resultaddr').innerHTML = result;
</script>
</div>
<!-- Sign -->
<div class="tab-pane fade" id="sign">
<form action="/" class="form-horizontal" id="sgForm" method="get" name="sgForm">
<fieldset>
<legend>Sign Message</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="sgSec">Private Key</label>
<div class="col-lg-10 controls">
<input class="form-control" id="sgSec" spellcheck="false" type="text" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="sgAddr">Address</label>
<div class="col-lg-10 controls">
<input class="form-control" id="sgAddr" readonly="readonly" type="text" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="sgMsg">Message</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="sgMsg" rows="5" spellcheck="false"></textarea>
<input type='file' onchange='openFile(event, "sgMsg")'>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="sgType">Signature Type</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="sgType">
<label class="btn btn-default active" title="Introduced by inputs.io, see https://inputs.io/clearsign"><input name="sgType" value="inputs_io" type="radio" checked/>Inputs.IO</label>
<label class="btn btn-default" title="Introduced in Multibit release notes"><input name="sgType" value="multibit" type="radio" />Multibit</label>
<label class="btn btn-default" title="Introduced in Bitcoin Armory 0.90"><input name="sgType" value="armory_base64" type="radio" />Armory Base64</label>
<label class="btn btn-default" title="Introduced in Bitcoin Armory 0.90"><input name="sgType" value="armory_clearsign" type="radio" />Armory Clearsign</label>
<label class="btn btn-default" title="Introduced in Bitcoin Armory 0.88"><input name="sgType" value="armory_hex" type="radio" />Armory Hex</label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="sgSig">Signed Message</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="sgSig" readonly="readonly" rows="10" spellcheck="false"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10 controls">
<div style="display: inline-block;" title="Magic prefix for signing and verify signed message" id="sign_strMessageMagic"></div><br>
<button class="btn btn-default" id="sgSign" title="Signatures require a random number which means signing the same data twice results in different sigs" type="button">Sign Message</button>
<span class="help-inline" id="sgLabel"></span>
<a id="download-signed" style="display:none;" href="" title="Download signed message.">Download signed message.</a>
</div>
</div>
</fieldset>
</form>
</div><!-- Verify -->
<div class="tab-pane fade" id="verify">
<form action="/" class="form-horizontal" id="vrForm" method="get" name="vrForm">
<fieldset>
<legend>Verify Message</legend>
<div class="hidden">
<div class="col-lg-offset-2 col-lg-10 alert alert-success fade in" id="vrSuccess">
<button aria-hidden="true" class="close" data-dismiss="alert" type="button">×</button> Message verified to be from <span id="vrAddrLabel"></span>
</div>
<div class="col-lg-offset-2 col-lg-10 alert alert-danger fade in" id="vrError">
<button aria-hidden="true" class="close" data-dismiss="alert" type="button">×</button> Message failed to verify!
</div>
<div class="col-lg-offset-2 col-lg-10 alert alert-warning fade in" id="vrWarning">
<button aria-hidden="true" class="close" data-dismiss="alert" type="button">×</button> Message verified to be from <span id="vrAddrLabel"></span> (address wasn't specified)
</div>
</div>
<div id="vrAlert"></div>
<div class="form-group">
<label class="col-lg-2 control-label" for="vrFrom">Verify From</label>
<div class="col-lg-10 controls">
<div class="btn-group" data-toggle="buttons" id="vrFrom">
<label class="btn btn-default active" title="RFC2440-like"><input id="vrFromMessage" name="vrFrom" type="radio" checked/>Signed Message</label>
<label class="btn btn-default"><input id="vrFromForm" name="vrFrom" type="radio" />Bitcoin-QT</label>
</div>
<div style="display: inline-block;" title="Magic prefix for signing and verify signed message" id="verify_strMessageMagic"></div>
</div>
</div>
<div class="form-group vrAddr" hidden>
<label class="col-lg-2 control-label" for="vrAddr">Address</label>
<div class="col-lg-10 controls">
<input class="form-control" id="vrAddr" type="text"/>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="vrMsg">Message</label>
<div class="col-lg-10 controls">
<textarea class="form-control" id="vrMsg" rows="14" spellcheck="false" title="If this textarea was been uploaded - put cursor on textarea, click or focus here after this loaded."></textarea>
<input type='file' onchange='openFile(event, "vrMsg")'>
</div>
</div>
<div class="form-group vrSig" hidden>
<label class="col-lg-2 control-label" for="vrSig">Signature</label>
<div class="col-lg-10 controls">
<input class="form-control" id="vrSig" spellcheck="false" type="text"/>
</div>
</div>
</fieldset>
</form>
</div>
<div class="tab-pane fade" id="xor">
<fieldset>
<legend>XOR formules ---> a XOR b = b XOR a = c;(a XOR b) XOR b = a; A XOR B = (A or (NOT B)) and (A or (not B))</legend>
<div class="form-group">
<label class="col-lg-2 control-label" align="right">a</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="a" placeholder="First hex value 'a' for XOR" type="text" autofocus="">
<div class="input-group-btn">
<button class="btn btn-default" id="xorRand" title="Uses cryptographically-strong window.crypto. Disabled on unsupported browsers." type="button" enabled="false">Secure Random</button>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" align="right">b</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" id="b" placeholder="Second hex value 'b' for XOR" type="text" autofocus="">
<span class="input-group-btn">
<button id="xorXOR" class="btn btn-info" type="button">a XOR b</button>
</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" align="right">a XOR b</label>
<div class="col-lg-10 controls">
<input class="form-control" id="c" title="a XOR b = b XOR a" readonly="readonly" type="text">
</div>
</div>
</fieldset>
<br><br>
<hr />
<script>
function XOR_hex(a, b) {
var res = "",
i = a.length,
j = b.length;
while (i-- >0 && j-- >0)
res = (parseInt(a.charAt(i), 16) ^ parseInt(b.charAt(j), 16)).toString(16) + res;
//document.write(res+"<br>"); //comment it
return res;
}
document.write("<b> Test XOR script. See more in the source code of this page.</b>"+"<br>");
var hex1 = "b1c85c061c98e713def0e2eddddb432738674c9f8962f09b75e943d55f9fb39f"; //message
document.write("message: "+hex1+"<br>");
var hex2 = "121b0d3327a21b8048fc7ca6fd07aacc0d8df59b99db098686696573e3686e6c"; //passrord
document.write("password: "+hex2+"<br>");
var hex3 = XOR_hex(hex1, hex2); //a3d351353b3afc93960c9e4b20dce9eb35eab90410b9f91df38026a6bcf7ddf3 //cipher
document.write("cipher: "+hex3+"<br>");
var hex4 = XOR_hex(hex3, hex2); //b1c85c061c98e713def0e2eddddb432738674c9f8962f09b75e943d55f9fb39f == hex1 //recovered message
document.write("recovered message: "+hex1+"<br>");
(hex4===hex1)?document.write("message === recovered_message<br>"):document.write("message !== recovered_message<br>");
var hex5 = XOR_hex(hex3, hex1); //121b0d3327a21b8048fc7ca6fd07aacc0d8df59b99db098686696573e3686e6c == hex2 //test password
document.write("got password from cipher and message: "+hex1+"<br>");
document.write("(a XOR b) XOR b = a; b = message; a = password; a XOR b = cipher; cipher XOR message = password."+"<br>");
//formula is (a XOR b) XOR b = a
(hex5===hex2)?document.write("recovered_password === password<br>"):document.write("recovered_password !== password<br>");
document.write('<hr>'+'<br>'+'<br>'+
'Why XOR?'+'<br>'+
'XOR raises the cryptographic strength of the simple passwords.'+'<br>'+
'Private key it is 256-bit value and it means 2^256 combinations for brute force.'+'<br>'+
'But simple passwords is vulnerable for dictionary attacks, because using open source algorithms for derive their values.'+'<br>'+
'XOR does not make any sence if brainwalletX hosted on the some site. '+'<br>'+
'Random_seed can be viewed in browsers and it will be public information then.'+'<br>'+
'But if any user will download this sourse and set up his own random_seed '+'<br>'+
'then he can use his simple passwords with more security, through using this functions.'+'<br><hr>');
</script>
<br>
For trading any cryptocurrency on the stock exchanges you can visit: <a href="https://coinmarketcap.com/">https://coinmarketcap.com/</a>
<br> Don't loss your funds! Remember that: "Buy high, sell low!" =)
</div>
<div class="tab-pane fade" id="crypt">
<form action="javascript:void(0);" class="form-horizontal" method="get" onsubmit="download(this['name'].value, this['text'].value)">
<fieldset>
<legend>Download Keyfile for encrypt/decrypt through OpenSSL or TrueCrypt</legend>
<div class="form-group">
<label class="col-lg-2 control-label" for="name">File name:</label>
<div class="col-lg-10 controls">
<div class="input-group-btn">
<input class="form-control" id="name" name="name" placeholder="File name" title="File name for your keyfile." type="text" value="Key_file_256bit.txt" autofocus="">
</div>
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label" for="keyfiledata">Passphrase</label>
<div class="col-lg-10 controls">
<div class="input-group">
<input class="form-control" type="password" id="keyfiledata" name="text" title="Key in keyfile data." readonly="readonly" placeholder="File name" autofocus="">
<span class="input-group-btn">
<button id="toggleKeyfiledata" class="btn btn-info" type="button">TEXT</button>
</span>
</div>
<input type="submit" value="Download as binary" onclick="as_text=false;">
<input type="submit" value="Download as text" onclick="as_text=true;">
</div>
</div>
</fieldset>
</form>
<hr />
<b>encrypt command line:</b> openssl enc -aes-256-cbc -salt -in secret.txt -out secret.enc -kfile keyfile_name.txt (or -k password)
<br>
<b>decrypt command line:</b> openssl enc -d -aes-256-cbc -in secret.enc > secret.txt -k password (or -kfile keyfile_name.txt)
<br>
Also you can use keyfile for encryption and decryption in TrueCrypt. (Latest stable version is 7.1a).
<br><br>
And... You can use this browser client-side cryptor: <a href="https://tutorialzine.com/2013/11/javascript-file-encrypter">javascript-file-encrypter (download zip available)</a>
<br>There is need password only and you can use this hash.
<br> Frame here:
<iframe src="javascript-file-encrypter/index.html" width="100%" height="500 px" style="border:0"></iframe>
</div>
<hr />
<footer>
<p>
<span class="pull-right"><a href="https://github.com/brainwalletX/brainwalletX.github.io">Forked GitHub Repository</a> | <a href="https://github.com/username1565/brainwallet.github.io">This GitHub Repository (Out of Service)</a> | <a href="https://github.com/username1565/brainwallet.github.io/archive/master.zip">Download ZIP</a> | Donations: <a href="bitcoin:18y4imCZsarP79LPFmPHv7SmgZ4ohSrVNF">Bitcoin, BTG: GJf8kQpps3UeyFv931KvkSNB9ujjCSpQRS</a></span>
</p>
</footer>
</div>
</div>
</body>
</html>