This repository has been archived by the owner on May 11, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot.html
122 lines (97 loc) · 4.52 KB
/
plot.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Random number generator plots - Passphrase.Today</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Dynamically generated graphical representation of the pseudo-random number generator in your browser">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="fonts/fonts.css">
<script src="sjcl.js"></script>
<script src="plot.js"></script>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
<link rel="apple-touch-icon" sizes="60x60" href="apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" href="apple-touch-icon-152x152.png">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 text-center">
<h1 class="logo">Secure Passphrase Generator</h1>
</div>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 text-justify">
<p>
This page shows dynamically generated graphical representation of the
pseudo-random number generator in your browser.
</p>
<p>
<tt>Math.random</tt> is the
default generator built into all browsers that was not designed with
cryptography in mind. <a href="http://bitwiseshiftleft.github.io/sjcl/" target="_blank">SJCL</a>
is a JavaScript cryptography library that intends to provide as much
randomness as possible in local environment.
</p>
<p>
The rule of thumb is that none of the <strong>scatter plots</strong> should show any
systematic patterns, the points should be pretty much evenly distributed.
In <strong>histograms</strong> the height of the bars on all width should be similar, with
no significant or continuous minimums or maximums.
</p>
<p>
The <tt>Math.random</tt> pictures are only provided for reference as this
generator does <strong>not</strong> use this method for generating random
numbers (we only use SJCL). However, chances are that if you're using relatively
new browser, the output from <tt>Math.random</tt> will be quite similar
to the one from SJCL as browser vendors have improved the generators a lot
over time!
</p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button type="button" class="btn btn-primary btn-lg" id="plot-button"
title="This may take a while on slower devices...">Run!
</button>
</div>
</div>
<div class="row">
<div class="col-md-6 text-center">
<h1>SJCL plot</h1>
<canvas id="sjcl-plot" width="100" height="100"></canvas>
<p>n=<span id="sjcl-plot-n"></span></p>
</div>
<div class="col-md-6 text-center">
<h1>Math.random plot</h1>
<canvas id="math-plot" width="100" height="100"></canvas>
<p>n=<span id="math-plot-n"></span></p>
</div>
</div>
<div class="row">
<div class="col-md-6 text-center">
<h1>SJCL histogram</h1>
<canvas id="sjcl-hist" width="300" height="300"></canvas>
<p>n=<span id="sjcl-hist-n"></span></p>
</div>
<div class="col-md-6 text-center">
<h1>Math.random histogram</h1>
<canvas id="math-hist" width="300" height="300"></canvas>
<p>n=<span id="math-hist-n"></span></p>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center" id="footer">
<a href="index.html">Main</a> |
<a href="https://passphrase.today/">Passphrase.Today</a> |
<a href="https://plus.google.com/+PawełKrawczyk/" rel="publisher" target="_blank">Author</a> |
<a href="https://github.com/kravietz/passphrase.today" target="_blank">GitHub</a> |
<a href="https://github.com/kravietz/passphrase.today/issues" target="_blank">Report bug</a>
</div>
</div>
</body>
</html>