bluecrypt-keypairs.js/index.html

108 lines
4.6 KiB
HTML
Raw Normal View History

2019-04-18 06:20:51 +00:00
<html>
<head>
<title>BlueCrypt</title>
2019-04-27 04:02:57 +00:00
<style>
textarea {
width: 42em;
height: 10em;
}
2019-04-27 04:53:28 +00:00
/* need to word wrap the binary no space der */
2019-04-27 05:24:37 +00:00
.js-der-public, .js-der-private{
2019-04-27 06:34:49 +00:00
white-space: pre-wrap; /* CSS3 */
white-space: -moz-pre-wrap; /* Firefox */
white-space: -pre-wrap; /* Opera <7 */
white-space: -o-pre-wrap; /* Opera 7 */
2019-04-27 04:53:28 +00:00
word-wrap: break-word; /* IE */
}
2019-04-27 04:02:57 +00:00
</style>
2019-04-18 06:20:51 +00:00
</head>
<body>
2019-05-11 04:37:35 +00:00
<h1>@bluecrypt/keypairs: Universal&nbsp;keygen&nbsp;&amp;&nbsp;signing&nbsp;for&nbsp;browsers</h1>
<p>Keypairs.js is <strong>easy-to-use browser crypto in kilobytes, not megabytes.</strong></p>
<p>It's a modern alternative to larger, legacy libraries like PKI.js and rsasign,
with more universal support for keygen, signing, and verification (including PKI, X509, JOSE, JWS, and JWT)
at a fraction of the cost.</p>
<p>This is intended to be explored with your JavaScript console open.</p>
<pre><code>&lt;script src="<a href="https://rootprojects.org/keypairs/bluecrypt-keypairs.js">https://rootprojects.org/keypairs/bluecrypt-keypairs.js</a>"&gt;&lt;/script&gt;</code></pre>
<pre><code>&lt;script src="<a href="https://rootprojects.org/keypairs/bluecrypt-keypairs.min.js">https://rootprojects.org/keypairs/bluecrypt-keypairs.min.js</a>"&gt;&lt;/script&gt;</code></pre>
<a href="https://git.rootprojects.org/root/bluecrypt-keypairs.js">Documentation</a>
2019-04-18 06:20:51 +00:00
<h2>Keypair Generation</h2>
<form class="js-keygen">
<p>Key Type:</p>
<div>
<input type="radio" id="-ktyEC"
name="kty" value="EC" checked>
<label for="-ktyEC">ECDSA</label>
<input type="radio" id="-ktyRSA"
name="kty" value="RSA">
<label for="-ktyRSA">RSA</label>
</div>
<div class="js-ec-opts">
<p>EC Options:</p>
2019-05-06 09:45:11 +00:00
<label for="-crv2"><input type="radio" id="-crv2"
name="ec-crv" value="P-256" checked>P-256</label>
<label for="-crv3"><input type="radio" id="-crv3"
name="ec-crv" value="P-384">P-384</label>
<!-- label for="-crv5"><input type="radio" id="-crv5"
name="ec-crv" value="P-521">P-521</label -->
2019-04-18 06:20:51 +00:00
</div>
<div class="js-rsa-opts" hidden>
<p>RSA Options:</p>
2019-05-06 09:45:11 +00:00
<label for="-modlen2"><input type="radio" id="-modlen2"
name="rsa-len" value="2048" checked>2048</label>
<label for="-modlen3"><input type="radio" id="-modlen3"
name="rsa-len" value="3072">3072</label>
<label for="-modlen5"><input type="radio" id="-modlen5"
name="rsa-len" value="4096">4096</label>
2019-04-18 06:20:51 +00:00
</div>
<button class="js-generate" hidden>Generate</button>
2019-04-26 22:26:33 +00:00
</form>
2019-04-18 06:20:51 +00:00
<div class="js-loading" hidden>Loading</div>
2019-04-26 22:26:33 +00:00
<details class="js-toc-jwk" hidden>
<summary>JWK Keypair</summary>
<pre><code class="js-jwk">&nbsp;</code></pre>
</details>
2019-04-27 05:24:37 +00:00
<details class="js-toc-der-private" hidden>
<summary>DER Private Binary</summary>
<pre><code class="js-der-private">&nbsp;</code></pre>
2019-04-27 04:02:57 +00:00
</details>
2019-04-27 05:24:37 +00:00
<details class="js-toc-der-public" hidden>
<summary>DER Public Binary</summary>
<pre><code class="js-der-public">&nbsp;</code></pre>
</details>
2019-04-27 06:34:49 +00:00
<details class="js-toc-pem js-toc-pem-pkcs1-private" hidden>
<summary>PEM Private (base64-encoded PKCS1 DER)</summary>
<pre><code class="js-input-pem-pkcs1-private" ></code></pre>
2019-04-27 05:24:37 +00:00
</details>
2019-04-27 06:34:49 +00:00
<details class="js-toc-pem js-toc-pem-sec1-private" hidden>
<summary>PEM Private (base64-encoded SEC1 DER)</summary>
<pre><code class="js-input-pem-sec1-private" ></code></pre>
</details>
<details class="js-toc-pem js-toc-pem-pkcs8-private" hidden>
<summary>PEM Private (base64-encoded PKCS8 DER)</summary>
<pre><code class="js-input-pem-pkcs8-private" ></code></pre>
</details>
<details class="js-toc-pem js-toc-pem-pkcs1-public" hidden>
<summary>PEM Public (base64-encoded PKCS1 DER)</summary>
<pre><code class="js-input-pem-pkcs1-public" ></code></pre>
</details>
<details class="js-toc-pem js-toc-pem-spki-public" hidden>
<summary>PEM Public (base64-encoded SPKI/PKIX DER)</summary>
<pre><code class="js-input-pem-spki-public" ></code></pre>
2019-04-27 04:02:57 +00:00
</details>
2019-05-01 03:34:09 +00:00
2019-04-27 03:27:08 +00:00
<script src="./lib/bluecrypt-encoding.js"></script>
<script src="./lib/asn1-packer.js"></script>
<script src="./lib/x509.js"></script>
2019-04-27 06:34:49 +00:00
<script src="./lib/ecdsa.js"></script>
2019-04-18 07:56:32 +00:00
<script src="./lib/rsa.js"></script>
2019-04-18 06:20:51 +00:00
<script src="./lib/keypairs.js"></script>
<script src="./app.js"></script>
</body>
</html>