mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-06 19:03:49 +00:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ff30babbc | ||
|
|
ee0981f1ec | ||
|
|
6024e655a8 | ||
|
|
7e6bdc498e | ||
|
|
16b4c2788a | ||
|
|
0197de2795 | ||
|
|
861750ae51 | ||
|
|
a40d59d904 | ||
|
|
d933c3f731 | ||
|
|
408ecc184a | ||
|
|
00114002fe | ||
|
|
e80955983d | ||
|
|
f20b7e7128 | ||
|
|
908dc06fe8 | ||
|
|
3d548c6f9b |
@@ -118,7 +118,7 @@
|
||||
<div class="container">
|
||||
|
||||
<h1 class="text-center">Mnemonic Code Converter</h1>
|
||||
<p class="version">v0.2.5</p>
|
||||
<p class="version">v0.2.6</p>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -167,7 +167,14 @@
|
||||
<div class="form-group">
|
||||
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
||||
<div class="col-sm-7">
|
||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards" data-translate-placeholder></textarea>
|
||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" data-translate-placeholder></textarea>
|
||||
<div class="row filter-warning text-danger hidden">
|
||||
<p class="col-sm-12">
|
||||
<strong>
|
||||
Some characters have been discarded
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
||||
<div class="crack-time col-sm-3 form-control-static"></div>
|
||||
@@ -637,6 +644,11 @@
|
||||
Read more at the
|
||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
||||
</p>
|
||||
<h3>BIP49 <span class="small" data-translate>Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3>
|
||||
<p data-translate-html>
|
||||
Read more at the
|
||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
|
||||
</p>
|
||||
<h3 data-translate>Private Keys</h3>
|
||||
<p>
|
||||
<span data-translate-html>
|
||||
@@ -7287,7 +7299,7 @@ this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(
|
||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
correctLevel:3,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
||||
</script>
|
||||
@@ -22133,135 +22145,135 @@ module.exports = {
|
||||
});
|
||||
</script>
|
||||
<script>bitcoinjs.bitcoin.networks.shadow = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xEE80286A,
|
||||
private: 0xEE8031E8
|
||||
},
|
||||
pubKeyHash: 0x3f,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0xbf,
|
||||
wif: 0xbf
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.shadowtn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x76C0FDFB,
|
||||
private: 0x76C1077A
|
||||
},
|
||||
pubKeyHash: 0x7f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xff,
|
||||
wif: 0xff
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.clam = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xa8c26d64,
|
||||
private: 0xa8c17826
|
||||
},
|
||||
pubKeyHash: 0x89,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0x85,
|
||||
wif: 0x85
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.crown = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x00,
|
||||
scriptHash: 0x05,
|
||||
wif: 0x80,
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dash = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x4c,
|
||||
scriptHash: 0x10,
|
||||
wif: 0xcc,
|
||||
wif: 0xcc
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.maza = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x32,
|
||||
scriptHash: 0x09,
|
||||
wif: 0xe0,
|
||||
wif: 0xe0
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dashtn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x043587cf,
|
||||
private: 0x04358394
|
||||
},
|
||||
pubKeyHash: 0x8c,
|
||||
scriptHash: 0x13,
|
||||
wif: 0xef,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.game = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x26,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xa6,
|
||||
wif: 0xa6
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.namecoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x34,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0x80,
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.peercoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x37,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0xb7,
|
||||
wif: 0xb7
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.slimcoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xef6adf10,
|
||||
private: 0xef69ea80
|
||||
},
|
||||
pubKeyHash: 0x3f,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0x46,
|
||||
wif: 0x46
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.slimcointn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x043587CF,
|
||||
private: 0x04358394
|
||||
},
|
||||
pubKeyHash: 0x6f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0x57,
|
||||
wif: 0x57
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dogecoin = {
|
||||
@@ -22272,8 +22284,8 @@ bitcoinjs.bitcoin.networks.dogecoin = {
|
||||
},
|
||||
pubKeyHash: 0x1e,
|
||||
scriptHash: 0x16,
|
||||
wif: 0x9e,
|
||||
},
|
||||
wif: 0x9e
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.viacoin = {
|
||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||
@@ -22283,8 +22295,8 @@ bitcoinjs.bitcoin.networks.viacoin = {
|
||||
},
|
||||
pubKeyHash: 0x47,
|
||||
scriptHash: 0x21,
|
||||
wif: 0xc7,
|
||||
},
|
||||
wif: 0xc7
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||
@@ -22294,8 +22306,8 @@ bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||
},
|
||||
pubKeyHash: 0x7f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xff,
|
||||
},
|
||||
wif: 0xff
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
||||
@@ -22305,8 +22317,8 @@ bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||
},
|
||||
pubKeyHash: 0x26,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xA6,
|
||||
},
|
||||
wif: 0xA6
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.jumbucks = {
|
||||
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
||||
@@ -22316,8 +22328,8 @@ bitcoinjs.bitcoin.networks.jumbucks = {
|
||||
},
|
||||
pubKeyHash: 0x2b,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xab,
|
||||
},
|
||||
wif: 0xab
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.zetacoin = {
|
||||
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
||||
@@ -22327,40 +22339,40 @@ bitcoinjs.bitcoin.networks.zetacoin = {
|
||||
},
|
||||
pubKeyHash: 0x50,
|
||||
scriptHash: 0x09,
|
||||
wif: 0xe0,
|
||||
}
|
||||
wif: 0xe0
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.myriadcoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x32,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0xb2,
|
||||
wif: 0xb2
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.pivx = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x022d2533,
|
||||
private: 0x0221312b
|
||||
},
|
||||
pubKeyHash: 0x1e,
|
||||
scriptHash: 0x0d,
|
||||
wif: 0xd4,
|
||||
wif: 0xd4
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x3a8061a0,
|
||||
private: 0x3a805837
|
||||
},
|
||||
pubKeyHash: 0x8b,
|
||||
scriptHash: 0x13,
|
||||
wif: 0xef,
|
||||
wif: 0xef
|
||||
};
|
||||
</script>
|
||||
<script>(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ethUtil = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
@@ -45774,7 +45786,7 @@ var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o
|
||||
|
||||
},{}]},{},[4])(4)
|
||||
});
|
||||
//# sourceMappingURL=zxcvbn.js.map
|
||||
|
||||
</script>
|
||||
<script>/*
|
||||
* Detects entropy from a string.
|
||||
@@ -46162,6 +46174,7 @@ window.Entropy = new (function() {
|
||||
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
||||
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
||||
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
||||
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||
DOM.phrase = $(".phrase");
|
||||
DOM.passphrase = $(".passphrase");
|
||||
DOM.generateContainer = $(".generate-container");
|
||||
@@ -47185,6 +47198,16 @@ window.Entropy = new (function() {
|
||||
DOM.entropyWordCount.text(wordCount);
|
||||
DOM.entropyBinary.text(entropy.binaryStr);
|
||||
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
||||
// detect and warn of filtering
|
||||
var rawNoSpaces = DOM.entropy.val().replace(/\s/g, "");
|
||||
var cleanNoSpaces = entropy.cleanStr.replace(/\s/g, "");
|
||||
var isFiltered = rawNoSpaces.length != cleanNoSpaces.length;
|
||||
if (isFiltered) {
|
||||
DOM.entropyFilterWarning.removeClass('hidden');
|
||||
}
|
||||
else {
|
||||
DOM.entropyFilterWarning.addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function getEntropyTypeStr(entropy) {
|
||||
|
||||
10
changelog.md
10
changelog.md
@@ -1,3 +1,13 @@
|
||||
# 0.2.6
|
||||
|
||||
* Detect and warn when entropy is filtered / discarded
|
||||
* Reword entropy text to indicate using a single source only
|
||||
* Add BIP49 to More Info section
|
||||
* Update compile script to work across python 2 and 3
|
||||
* QR Codes use correctLevel 3 instead of 2
|
||||
* Source map removed from zxcvbn
|
||||
* Tidy up code with consistent use of commas and semicolons
|
||||
|
||||
# 0.2.5
|
||||
|
||||
* Rename variables for clarity between BIP49 and P2WPKH Nested In P2SH
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import re
|
||||
import datetime
|
||||
from io import open
|
||||
|
||||
# This script generates the bip39-standalone.html file.
|
||||
|
||||
|
||||
@@ -55,7 +55,10 @@ at 1PC9aZC4hNX2rmmrt7uHTfYAS3hRbph4UN
|
||||
Please do not make modifications to `bip39-standalone.html`, since they will
|
||||
be overwritten by `compile.py`.
|
||||
|
||||
Make changes in `src/*` and apply them using the command `python compile.py`
|
||||
Make changes in `src/*`.
|
||||
|
||||
Changes are applied during release using the command `python compile.py`, so
|
||||
please do not commit changes to `bip39-standalone.html`
|
||||
|
||||
# Tests
|
||||
|
||||
|
||||
@@ -7,15 +7,17 @@ created with the following steps:
|
||||
1. Run `python compile.py`
|
||||
1. Commit these changes with message `Release vX.Y.Z`
|
||||
1. Tag the commit `git tag X.Y.Z`
|
||||
1. Push the changes `git push`
|
||||
1. Push the new tag `git push --tags`
|
||||
1. Get the hash of the file `sha256sum bip39-standalone.html`
|
||||
1. Create the text for the release notes (see prior releases)
|
||||
1. Sign the release notes `gpg --clearsign /tmp/releasenotes.txt`
|
||||
1. Sign the release notes `gpg --clearsign /tmp/signature.txt`
|
||||
1. Push the changes `git push`
|
||||
1. Push the new tag `git push --tags`
|
||||
1. Create a release on github from the tagged commit
|
||||
1. include the signed release notes as text for the release
|
||||
1. include the changelog for this release as text for the release
|
||||
1. attach signature.txt.asc
|
||||
1. attach the bip39-standalone.html file
|
||||
1. Add a new post to twitter from @bip39tool with the version, link and hash
|
||||
1. Publish to any hosted locations (eg iancoleman.github.io/bip39)
|
||||
1. Download the file from the release and confirm it hashes to the expected value
|
||||
1. Confirm the signature as posted to the release notes.
|
||||
1. Download the file from the release and confirm it hashes to the expected value `sha256sum bip39-standalone.html`
|
||||
1. Download the signature from the release and verify it. `gpg --verify signature.txt.asc`
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="container">
|
||||
|
||||
<h1 class="text-center">Mnemonic Code Converter</h1>
|
||||
<p class="version">v0.2.5</p>
|
||||
<p class="version">v0.2.6</p>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -163,7 +163,14 @@
|
||||
<div class="form-group">
|
||||
<label for="entropy" class="col-sm-2 control-label" data-translate>Entropy</label>
|
||||
<div class="col-sm-7">
|
||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts binary, base 6, 6-sided dice, base 10, hexadecimal, cards" data-translate-placeholder></textarea>
|
||||
<textarea id="entropy" rows="2" class="entropy form-control" placeholder="Accepts either binary, base 6, 6-sided dice, base 10, hexadecimal or cards" data-translate-placeholder></textarea>
|
||||
<div class="row filter-warning text-danger hidden">
|
||||
<p class="col-sm-12">
|
||||
<strong>
|
||||
Some characters have been discarded
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Based on estimates from zxcvbn using Filtered Entropy">Time To Crack</span></label>
|
||||
<div class="crack-time col-sm-3 form-control-static"></div>
|
||||
@@ -633,6 +640,11 @@
|
||||
Read more at the
|
||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki" target="_blank">official BIP44 spec</a>
|
||||
</p>
|
||||
<h3>BIP49 <span class="small" data-translate>Derivation scheme for P2WPKH-nested-in-P2SH based accounts</span></h3>
|
||||
<p data-translate-html>
|
||||
Read more at the
|
||||
<a href="https://github.com/bitcoin/bips/blob/master/bip-0049.mediawiki" target="_blank">official BIP49 spec</a>
|
||||
</p>
|
||||
<h3 data-translate>Private Keys</h3>
|
||||
<p>
|
||||
<span data-translate-html>
|
||||
|
||||
@@ -1,133 +1,133 @@
|
||||
bitcoinjs.bitcoin.networks.shadow = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xEE80286A,
|
||||
private: 0xEE8031E8
|
||||
},
|
||||
pubKeyHash: 0x3f,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0xbf,
|
||||
wif: 0xbf
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.shadowtn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x76C0FDFB,
|
||||
private: 0x76C1077A
|
||||
},
|
||||
pubKeyHash: 0x7f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xff,
|
||||
wif: 0xff
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.clam = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xa8c26d64,
|
||||
private: 0xa8c17826
|
||||
},
|
||||
pubKeyHash: 0x89,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0x85,
|
||||
wif: 0x85
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.crown = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x00,
|
||||
scriptHash: 0x05,
|
||||
wif: 0x80,
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dash = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x4c,
|
||||
scriptHash: 0x10,
|
||||
wif: 0xcc,
|
||||
wif: 0xcc
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.maza = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x32,
|
||||
scriptHash: 0x09,
|
||||
wif: 0xe0,
|
||||
wif: 0xe0
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dashtn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x043587cf,
|
||||
private: 0x04358394
|
||||
},
|
||||
pubKeyHash: 0x8c,
|
||||
scriptHash: 0x13,
|
||||
wif: 0xef,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.game = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x26,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xa6,
|
||||
wif: 0xa6
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.namecoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x34,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0x80,
|
||||
wif: 0x80
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.peercoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x37,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0xb7,
|
||||
wif: 0xb7
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.slimcoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0xef6adf10,
|
||||
private: 0xef69ea80
|
||||
},
|
||||
pubKeyHash: 0x3f,
|
||||
scriptHash: 0x7d,
|
||||
wif: 0x46,
|
||||
wif: 0x46
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.slimcointn = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x043587CF,
|
||||
private: 0x04358394
|
||||
},
|
||||
pubKeyHash: 0x6f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0x57,
|
||||
wif: 0x57
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.dogecoin = {
|
||||
@@ -138,8 +138,8 @@ bitcoinjs.bitcoin.networks.dogecoin = {
|
||||
},
|
||||
pubKeyHash: 0x1e,
|
||||
scriptHash: 0x16,
|
||||
wif: 0x9e,
|
||||
},
|
||||
wif: 0x9e
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.viacoin = {
|
||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||
@@ -149,8 +149,8 @@ bitcoinjs.bitcoin.networks.viacoin = {
|
||||
},
|
||||
pubKeyHash: 0x47,
|
||||
scriptHash: 0x21,
|
||||
wif: 0xc7,
|
||||
},
|
||||
wif: 0xc7
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||
@@ -160,8 +160,8 @@ bitcoinjs.bitcoin.networks.viacointestnet = {
|
||||
},
|
||||
pubKeyHash: 0x7f,
|
||||
scriptHash: 0xc4,
|
||||
wif: 0xff,
|
||||
},
|
||||
wif: 0xff
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
||||
@@ -171,8 +171,8 @@ bitcoinjs.bitcoin.networks.gamerscoin = {
|
||||
},
|
||||
pubKeyHash: 0x26,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xA6,
|
||||
},
|
||||
wif: 0xA6
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.jumbucks = {
|
||||
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
||||
@@ -182,8 +182,8 @@ bitcoinjs.bitcoin.networks.jumbucks = {
|
||||
},
|
||||
pubKeyHash: 0x2b,
|
||||
scriptHash: 0x05,
|
||||
wif: 0xab,
|
||||
},
|
||||
wif: 0xab
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.zetacoin = {
|
||||
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
||||
@@ -193,38 +193,38 @@ bitcoinjs.bitcoin.networks.zetacoin = {
|
||||
},
|
||||
pubKeyHash: 0x50,
|
||||
scriptHash: 0x09,
|
||||
wif: 0xe0,
|
||||
}
|
||||
wif: 0xe0
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.myriadcoin = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x0488b21e,
|
||||
private: 0x0488ade4
|
||||
},
|
||||
pubKeyHash: 0x32,
|
||||
scriptHash: 0x00, // TODO set this correctly
|
||||
wif: 0xb2,
|
||||
wif: 0xb2
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.pivx = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x022d2533,
|
||||
private: 0x0221312b
|
||||
},
|
||||
pubKeyHash: 0x1e,
|
||||
scriptHash: 0x0d,
|
||||
wif: 0xd4,
|
||||
wif: 0xd4
|
||||
};
|
||||
|
||||
bitcoinjs.bitcoin.networks.pivxtestnet = {
|
||||
messagePrefix: "unused",
|
||||
messagePrefix: 'unused',
|
||||
bip32: {
|
||||
public: 0x3a8061a0,
|
||||
private: 0x3a805837
|
||||
},
|
||||
pubKeyHash: 0x8b,
|
||||
scriptHash: 0x13,
|
||||
wif: 0xef,
|
||||
wif: 0xef
|
||||
};
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
DOM.entropyWordCount = DOM.entropyContainer.find(".word-count");
|
||||
DOM.entropyBinary = DOM.entropyContainer.find(".binary");
|
||||
DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length");
|
||||
DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning");
|
||||
DOM.phrase = $(".phrase");
|
||||
DOM.passphrase = $(".passphrase");
|
||||
DOM.generateContainer = $(".generate-container");
|
||||
@@ -1061,6 +1062,16 @@
|
||||
DOM.entropyWordCount.text(wordCount);
|
||||
DOM.entropyBinary.text(entropy.binaryStr);
|
||||
DOM.entropyBitsPerEvent.text(bitsPerEvent);
|
||||
// detect and warn of filtering
|
||||
var rawNoSpaces = DOM.entropy.val().replace(/\s/g, "");
|
||||
var cleanNoSpaces = entropy.cleanStr.replace(/\s/g, "");
|
||||
var isFiltered = rawNoSpaces.length != cleanNoSpaces.length;
|
||||
if (isFiltered) {
|
||||
DOM.entropyFilterWarning.removeClass('hidden');
|
||||
}
|
||||
else {
|
||||
DOM.entropyFilterWarning.addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function getEntropyTypeStr(entropy) {
|
||||
|
||||
2
src/js/jquery.qrcode.min.js
vendored
2
src/js/jquery.qrcode.min.js
vendored
@@ -23,6 +23,6 @@ this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(
|
||||
55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
|
||||
45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
|
||||
(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
|
||||
correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
correctLevel:3,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
|
||||
j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
|
||||
d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;$(a).appendTo(this)})}})($);
|
||||
|
||||
@@ -25,4 +25,4 @@ var time_estimates;time_estimates={estimate_attack_times:function(e){var t,n,s,o
|
||||
|
||||
},{}]},{},[4])(4)
|
||||
});
|
||||
//# sourceMappingURL=zxcvbn.js.map
|
||||
|
||||
|
||||
38
tests.js
38
tests.js
@@ -4306,6 +4306,44 @@ page.open(url, function(status) {
|
||||
});
|
||||
},
|
||||
|
||||
// github issue 99
|
||||
// https://github.com/iancoleman/bip39/issues/99#issuecomment-327094159
|
||||
// "warn me emphatically when they have detected invalid input" to the entropy field
|
||||
// A warning is shown when entropy is filtered and discarded
|
||||
function() {
|
||||
page.open(url, function(status) {
|
||||
// use entropy
|
||||
page.evaluate(function() {
|
||||
$(".use-entropy").prop("checked", true).trigger("change");
|
||||
$(".entropy").val("00000000 00000000 00000000 00000000").trigger("input");
|
||||
});
|
||||
// check the filter warning does not show
|
||||
waitForGenerate(function() {
|
||||
var warningIsHidden = page.evaluate(function() {
|
||||
return $(".entropy-container .filter-warning").hasClass("hidden");
|
||||
});
|
||||
if (!warningIsHidden) {
|
||||
console.log("Entropy filter warning is showing when it should not");
|
||||
fail();
|
||||
}
|
||||
page.evaluate(function() {
|
||||
$(".entropy").val("10000000 zxcvbn 00000000 00000000 00000000").trigger("input");
|
||||
});
|
||||
// check the filter warning shows
|
||||
waitForEntropyFeedback(function() {
|
||||
var warningIsHidden = page.evaluate(function() {
|
||||
return $(".entropy-container .filter-warning").hasClass("hidden");
|
||||
});
|
||||
if (warningIsHidden) {
|
||||
console.log("Entropy filter warning is not showing when it should");
|
||||
fail();
|
||||
}
|
||||
next();
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
// If you wish to add more tests, do so here...
|
||||
|
||||
// Here is a blank test template
|
||||
|
||||
Reference in New Issue
Block a user