Bluecrypt JWK to SSH (for Browsers)
A minimal library to parse an SSH public key (
and convert it into a public JWK using Vanilla JS.
Works for RSA and ECDSA public keys.
< 100 lines of code | < 1.0kb gzipped | 2.0kb minified | 2.9kb with comments
- SSH Public Keys
- RSA Public Keys
- EC Public Keys
- P-256 (prime256v1, secp256r1)
- P-384 (secp384r1)
- node.js version
- on npm as bluecrypt-jwk-to-ssh
Need SSH Private Keys?
SSH private keys (
id_rsa) are just normal PEM files.
git clone https://git.coolaj86.com/coolaj86/bluecrypt-jwk-to-ssh.jspushd bluecrypt-jwk-to-ssh.js/
It's also on npm:
npm install bluecrypt-jwk-to-ssh
var jwk ="kty": "EC""crv": "P-256""x": "IT1SWLxsacPiE5Z16jkopAn8_-85rMjgyCokrnjDft4""y": "mP2JwOAOdMmXuwpxbKng3KZz27mz-nKWIlXJ3rzSGMo";var pub = SSH;console;
Other Tools in the Bluecrypt Suite
- Bluecrypt JWK to SSH (RSA, EC, SSH)
- Bluecrypt ASN.1 decoder (x509, RSA, EC, etc)
- Bluecrypt ASN.1 builder (x509, RSA, EC, etc)
Bluecrypt™ is owned by AJ ONeal