-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (97 loc) · 6 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<title>battery staple</title>
</head>
<body>
<header>
<div class="inner">
<h1>battery staple</h1>
<h2></h2>
<a href="https://github.com/batterystaple/batterystaple.github.io" class="button">
<small>See source code at</small>
GitHub</a>
</div>
</header>
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<h1>
<a id="password" class="anchor" href="#password" aria-hidden="true"><span
class="octicon octicon-link"></span></a>Password</h1>
<div id="passwordArea">
<pre id="generatedPassword"></pre>
</div>
<div id="buttons">
<button id="copy">Copy to clipboard</button>
<span style="" id="toClipboard"></span>
<button id="clear">Clear clipboard</button>
<button id="new">New password</button>
</div>
<h1>
<a id="settings" class="anchor" href="#settings" aria-hidden="true"><span
class="octicon octicon-link"></span></a>Settings</h1>
<div>
<label for="passwordLengthSelect">Number of words:</label>
<select id="passwordLengthSelect">
<option value="4">4 (default)</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
</select><br>
<input id="capitalizeCheckbox" type="checkbox"><label for="capitalizeCheckbox">Capitalize words
(default: off)</label><br>
<input id="addNumberCheckbox" type="checkbox"><label for="addNumberCheckbox">Add number between
1 and 10 (default: off)</label><br>
<input id="useSpacesCheckbox" type="checkbox"><label for="useSpacesCheckbox">Add space character
between words (default: off)</label>
</div>
<h1>
<a id="notes" class="anchor" href="#settings" aria-hidden="true"><span
class="octicon octicon-link"></span></a>Notes</h1>
<ul>
<li>Do <b>not</b> try to find a password which uses words you like or know. Doing so will make
your password weaker.
</li>
<li>Capitalizing words or including random numbers does not make password guessing significantly
harder, but may be necessary to satisfy the password requirements of some systems.
</li>
<li>Adding spaces is not recommended as it does not make the password safer. Also, some systems
do not allow spaces in passwords.
</li>
</ul>
</section>
<aside id="sidebar">
<p>Inspired by the "correct horse battery staple" scheme outlined in <a
href="https://xkcd.com/936/">XKCD #936: Password strength</a>. Some background on this can
be found on Security Stack Exchange: <a href="https://security.stackexchange.com/q/6095/49360">Short
complex password, or long dictionary passphrase?</a></p>
<p>The <a href="words.txt">word list</a> contains <span id="wordCount"><i>{counting...}</i></span>
english words taken from the <a
href="https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases">passphrase
word list by eff.org</a> (leaving out four words that contain a dash, like "t-shirt"). All
remaining words only use the characters a-z and default to lower case.</p>
<p>Your current settings result in a password strength of approximately <span id="passwordStrength"><i>{calculating...}</i></span>
<a href="https://en.wikipedia.org/wiki/Password_strength#Random_passwords">bits of entropy</a>.
For reference, this is comparable to a classic password with a length of <span
id="classicPasswordLength"><i>{calculating...}</i></span> consisting of A-Z, a-z, 0-9,
!@#$%^&*.</p>
<p>Settings are stored in your browser's localStorage area for your next visit.</p>
<p>Words are chosen using client-side <a href="javascripts/main.js">JavaScript code</a> that does
not use any libraries. The code uses a cryptographically secure random number generator.</p>
<p>This page uses the GitHub pages "Architect" theme by <a href="https://twitter.com/jasonlong">Jason
Long</a>.</p>
</aside>
</div>
</div>
<script src="javascripts/main.js"></script>
</body>
</html>