Skip to content

Commit

Permalink
Release v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Coleman committed Jun 20, 2017
1 parent fe81f9b commit f1e5d48
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 35 deletions.
46 changes: 12 additions & 34 deletions bip39-standalone.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<div class="container">

<h1 class="text-center">Mnemonic Code Converter</h1>
<p class="version">v0.1.0</p>
<p class="version">v0.1.1</p>
<hr>
<div class="row">
<div class="col-md-12">
Expand Down Expand Up @@ -169,8 +169,8 @@ <h2>Mnemonic</h2>
<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>
<div class="row">
<label class="col-sm-3 control-label" data-translate>Strength</label>
<div class="strength col-sm-3 form-control-static"></div>
<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>
<label class="col-sm-3 control-label" data-translate>Event Count</label>
<div class="event-count col-sm-3 form-control-static"></div>
</div>
Expand All @@ -181,7 +181,7 @@ <h2>Mnemonic</h2>
<div class="bits-per-event col-sm-3 form-control-static"></div>
</div>
<div class="row">
<label class="col-sm-3 control-label" data-translate>Word Count</label>
<label class="col-sm-3 control-label" data-translate>Raw Entropy Words</label>
<div class="word-count col-sm-3 form-control-static"></div>
<label class="col-sm-3 control-label" data-translate><span class="more-info" data-translate-title title="Total bits of entropy may be less than indicated if any entropy event uses a weak source.">Total Bits</span></label>
<div class="bits col-sm-3 form-control-static"></div>
Expand Down Expand Up @@ -43764,7 +43764,7 @@ <h3 data-translate>Libraries</h3>
DOM.entropy = $(".entropy");
DOM.entropyFiltered = DOM.entropyContainer.find(".filtered");
DOM.entropyType = DOM.entropyContainer.find(".type");
DOM.entropyStrength = DOM.entropyContainer.find(".strength");
DOM.entropyCrackTime = DOM.entropyContainer.find(".crack-time");
DOM.entropyEventCount = DOM.entropyContainer.find(".event-count");
DOM.entropyBits = DOM.entropyContainer.find(".bits");
DOM.entropyBitsPerEvent = DOM.entropyContainer.find(".bits-per-event");
Expand Down Expand Up @@ -44649,7 +44649,7 @@ <h3 data-translate>Libraries</h3>
}

function clearEntropyFeedback() {
DOM.entropyStrength.text("...");
DOM.entropyCrackTime.text("...");
DOM.entropyType.text("");
DOM.entropyWordCount.text("0");
DOM.entropyEventCount.text("0");
Expand All @@ -44661,37 +44661,15 @@ <h3 data-translate>Libraries</h3>

function showEntropyFeedback(entropy) {
var numberOfBits = entropy.binaryStr.length;
var strength = "extremely weak";
if (numberOfBits >= 64) {
strength = "very weak";
}
if (numberOfBits >= 96) {
strength = "weak";
}
if (numberOfBits >= 128) {
strength = "strong";
}
if (numberOfBits >= 160) {
strength = "very strong";
}
if (numberOfBits >= 192) {
strength = "extremely strong";
}
// If time to crack is less than one day, and password is considered
// strong or better based on the number of bits, rename strength to
// 'easily cracked'.
var timeToCrack = "unknown";
try {
var z = zxcvbn(entropy.base.parts.join(""));
var timeToCrack = z.crack_times_seconds.offline_fast_hashing_1e10_per_second;
if (timeToCrack < 86400 && entropy.binaryStr.length >= 128) {
strength = "easily cracked";
if (z.feedback.warning != "") {
strength = strength + " - " + z.feedback.warning;
};
}
timeToCrack = z.crack_times_display.offline_fast_hashing_1e10_per_second;
if (z.feedback.warning != "") {
timeToCrack = timeToCrack + " - " + z.feedback.warning;
};
}
catch (e) {
strength = "unknown";
console.log("Error detecting entropy strength with zxcvbn:");
console.log(e);
}
Expand All @@ -44700,7 +44678,7 @@ <h3 data-translate>Libraries</h3>
var bitsPerEvent = entropy.bitsPerEvent.toFixed(2);
DOM.entropyFiltered.html(entropy.cleanHtml);
DOM.entropyType.text(entropyTypeStr);
DOM.entropyStrength.text(strength);
DOM.entropyCrackTime.text(timeToCrack);
DOM.entropyEventCount.text(entropy.base.ints.length);
DOM.entropyBits.text(numberOfBits);
DOM.entropyWordCount.text(wordCount);
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.1.1

* Add DASH Testnet
* Change entropy Strength to Time To Crack

# 0.1.0 2017-06-14

* Add changelog
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<div class="container">

<h1 class="text-center">Mnemonic Code Converter</h1>
<p class="version">v0.1.0</p>
<p class="version">v0.1.1</p>
<hr>
<div class="row">
<div class="col-md-12">
Expand Down

0 comments on commit f1e5d48

Please sign in to comment.