-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathed.html
165 lines (135 loc) · 4.5 KB
/
ed.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ed25519 Online Tool</title>
<script src="app.js"></script>
<script src="noble-ed25519.js"></script>
<script src="urlformjs/urlform.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="Ed25519 online tool, Ed25519ph" />
<style>
* {
font-family: 'Ubuntu Mono', monospace;
font-size: 18px;
}
body {
margin-left: 20px;
}
button,
select,
input,
textarea {
padding: 7px;
margin: 5px;
}
li {
padding-bottom: 15px;
}
span {
white-space: nowrap;
}
#AppMessage,
h1 {
font-weight: bold;
font-size: 24px;
}
.footnote,
.footnote p,
.footnote a,
.footnote li {
font-size: 16px;
}
#share1,
#share2 {
display: inline-block;
}
.grid-container {
display: grid;
align-items: center;
grid-template-columns: 140px auto;
row-gap: 12px;
}
</style>
</head>
<body>
<h1>Ed25519 Online Tool - Sign, Verify, and Generate</h1>
<h3> This tool may be used offline and does not transmit keys. Key generation is done locally in browser. </h3>
<hr>
<div class="grid-container">
<label for="EdType">Algorithm</label>
<div>
<select title='Ed25519 uses "PureEdDSA" without pre-hashing. Ed25519ph uses "HashEdDSA" and expects input to be a digest (SHA-512).' name="AlgType" id="AlgType">
<option value="Msg">Ed25519</option>
<option value="Dig">Ed25519ph</option>
</select>
</div>
<label for="EdType">Msg Encoding</label>
<div>
<select title="Encoding of input message" name="MsgEnc" id="MsgEnc">
<option value="Text">Text (UTF-8)</option>
<option value="Hex">Hex</option>
<option value="B64">base64</option>
</select>
</div>
<label for="InputMsg">✉️ Message</label>
<div>
<textarea name="InputMsg" id="InputMsg" cols="64" rows="4"></textarea>
</div>
<label for="KeyEnc">Key Encoding</label>
<div>
<select name="KeyEnc" id="KeyEnc" title="Key Encoding">
<option value="Hex">Hex</option>
<option value="B64">base64</option>
</select>
</div>
<label for="Seed">🌱 Seed (Private Key)</label>
<div>
<input type="text" id="Seed" size="64">
<button class="item-3" title="Generates a random seed and public key." id="GenRandKeyPairBtn">🎲🔑 Generate Random Key</button>
</div>
<label for="PublicKey">🔑 Public Key </label>
<div>
<input type="text" id="PublicKey" size="64">
<button class="item-4" title="Generates public key from given seed." id="GenKeyFromSeedBtn">⚙️ Public Key from Seed</button>
</div>
<label for="Signature">✍️ Signature</label>
<div>
<input type="text" id="Signature" size="128">
</div>
<p></p>
<div>
<button id="SignBtn" title="Sign message using current seed.">🔏 Sign</button>
<button id="VerifyBtn" title="Verify message using signature and public key.">✅ Verify</button>
<button id="ClearBtn" title="Reset the page and clear all boxes.">🚫 Clear all</button>
</div>
<label for="PublicKey">Valid: </label>
<div><span id="AppMessage">❌ Javascript must be enabled for this tool to work. </span></div>
</div>
<br>
<hr>
<p><strong>Meta</strong></p>
<div class="grid-container">
<label>Seed || Public</label>
<div><span id="Kyp"></span>
</div>
<input type="checkbox" id="verify" checked hidden>
<div id="share1" class="shareElement"><button id="shareURLBtn" title="Generate a share URL with current values.">🔗 Share</button></div>
<div id="share2" class="shareElement"><span id="shareURL"></span></div>
</div>
<hr>
<div class="footnote">
<ul>
<li><a href="https://github.com/Cyphrme/Ed25519Tool">Source code on Github</a></li>
<li><a href="https://cyphr.me/ed25519_tool/ed.html">Live Demo (this page)</a></li>
<br>
<li><a href="https://cyphr.me/coze_verifier_simple/coze.html">Simple Coze Verifier</a></li>
<li>Convert <a href="https://convert.zamicol.com/#?inAlph=Hex&outAlph=base64">Hex to base64</a> or <a href="https://convert.zamicol.com/?inAlph=base64&outAlph=Hex">base64 to Hex </a></li>
<li><a href="https://tweetnacl.js.org/#/sign">Javascript TweetNaCL tool </a></li>
<li><a href="https://paulmillr.com/noble">Noble Ed25519 tool.</a> <a href="https://github.com/paulmillr/noble-ed25519">Implemented with noble/ed25519.</a></li>
<li><a href="https://blog.mozilla.org/warner/2011/11/29/ed25519-keys"> Mozilla blog, "How do Ed25519 keys work?"</a></li>
<li><a href="https://cyphr.me">Sponsored by Cyphr.me</a></li>
</ul>
</div>
</body>
</html>