'\" t .\" Title: jose-jwk-pub .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 11/01/2022 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "JOSE\-JWK\-PUB" "1" "11/01/2022" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" jose-jwk-pub \- Cleans private keys from a JWK .SH "SYNOPSIS" .sp \fBjose jwk pub\fR \-i JWK [\-o JWK] .SH "OVERVIEW" .sp The \fBjose jwk pub\fR command removes all private key material from one or more JWK(Set) inputs\&. The output will contain only public key material\&. .sp If the JWK contains the "key_ops" property, it will be automatically adjusted to include only operations relevant to public keys\&. .SH "OPTIONS" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-i\fR \fIJSON\fR, \fB\-\-input\fR=\fIJSON\fR : Parse JWK(Set) from JSON .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-i\fR \fIFILE\fR, \fB\-\-input\fR=\fIFILE\fR : Read JWK(Set) from FILE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-i\fR \-, \fB\-\-input\fR=\- : Read JWK(Set) from standard input .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-o\fR \fIFILE\fR, \fB\-\-output\fR=\fIFILE\fR : Write JWK(Set) to FILE .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-o\fR \-, \fB\-\-output\fR=\- : Write JWK(Set) to standard input .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-s\fR, \fB\-\-set\fR : Always output a JWKSet .RE .SH "EXAMPLES" .sp Clean private key material from a JWK: .sp .if n \{\ .RS 4 .\} .nf $ jose jwk gen \-i \*(Aq{"alg":"ES256"}\*(Aq \-o prv\&.jwk $ cat prv\&.jwk {"alg":"ES256","crv":"P\-256","key_ops":["sign","verify"],"kty":"EC", \&.\&.\&.} $ jose jwk pub \-i prv\&.jwk \-o pub\&.jwk $ cat pub\&.jwk {"alg":"ES256","crv":"P\-256","key_ops":["verify"],"kty":"EC", \&.\&.\&.} .fi .if n \{\ .RE .\} .SH "AUTHOR" .sp Nathaniel McCallum .SH "SEE ALSO" .sp \fBjose\-alg\fR(1), \fBjose\-jwe\-enc\fR(1), \fBjose\-jwk\-exc\fR(1), \fBjose\-jwk\-gen\fR(1), \fBjose\-jwk\-thp\fR(1), \fBjose\-jwk\-use\fR(1), \fBjose\-jws\-ver\fR(1)