https://github.com/jphastings/jwker
A PEM -> JWK command line conversion tool
https://github.com/jphastings/jwker
cli cryptography encryption jwk pem
Last synced: 17 days ago
JSON representation
A PEM -> JWK command line conversion tool
- Host: GitHub
- URL: https://github.com/jphastings/jwker
- Owner: jphastings
- License: mit
- Created: 2017-11-04T10:19:14.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2023-09-08T09:45:25.000Z (about 2 years ago)
- Last Synced: 2025-10-10T18:16:27.664Z (17 days ago)
- Topics: cli, cryptography, encryption, jwk, pem
- Language: Go
- Homepage:
- Size: 1 MB
- Stars: 21
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jwker
This is a command line tool to easily convert keys between the PEM and JWK file formats.
## Usage
Convert from PEM to JWK format:
```bash
jwker my-key.pem my-key.jwk
jwker my-key.pem | pbcopy
cat my-key.pem | jwker > my-key.jwk
```
A complete example for creating a new keypair, saving the public key as a JWK and the private key as a PEM, but with a passphrase:
```bash
openssl ecparam -genkey -name prime256v1 \
| tee >(openssl ec -pubout | jwker > key.pub.jwk) \
| openssl ec -aes256 -out key.prv.pem
```
Convert from JWK to PEM format:
```bash
jwker my-key.jwk my-key.pwm
jwker my-key.jwk | pbcopy
cat my-key.jwk | jwker
```
## Installation
If you have [homebrew](https://brew.sh/) installed:
```bash
brew install jphastings/tools/jwker
```
Or, if you have go installed:
```bash
go install github.com/jphastings/jwker/cmd/jwker@latest
```