'\" t
.\" Title: jose-jwk-thp
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 07/06/2024
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "JOSE\-JWK\-THP" "1" "07/06/2024" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * 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-thp \- Calculates the JWK thumbprint
.SH "SYNOPSIS"
.sp
\fBjose jwk thp\fR \-i JWK [\-H ALG] [\-o THP]
.SH "OVERVIEW"
.sp
The \fBjose jwk thp\fR command calculates the thumbprint of one or more JWKs\&.
.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) standard input
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-a\fR
\fIALG\fR,
\fB\-\-algorithm\fR=\fIALG\fR
: Use the specified hash algorithm (case sensitive)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-a\fR
?,
\fB\-\-algorithm\fR=? : List available hash algorithms
.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 thumbprint(s) 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 thumbprint(s) to standard input
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fB\-f\fR
\fITHP\fR,
\fB\-\-find\fR=\fITHP\fR
: Search input keys for JWK with the given thumbprint
.RE
.SH "EXAMPLES"
.sp
Calculate the S1 thumbprint of a newly generated key:
.sp
.if n \{\
.RS 4
.\}
.nf
$ jose jwk gen \-i \*(Aq{"alg":"ES256"}\*(Aq \-a S1 | jose jwk thp \-i\-
BzmSH6W8a8LlbQ1mD0iBJdYj4x4
.fi
.if n \{\
.RE
.\}
.sp
Calculate the S256 thumbprints of a JWKSet containing two keys:
.sp
.if n \{\
.RS 4
.\}
.nf
$ jose jwk thp \-i keys\&.jwkset \-a S256
6HJwXEuRh8gAkTz4BodEvcEj_KXkgjc\-7Qez3d4VNMs
jo_j_O5gqYpKcZKHPp3miTszAeV60MXHvdb_kkjjTWE
.fi
.if n \{\
.RE
.\}
.sp
Find the input key with the given thumbprint:
.sp
.if n \{\
.RS 4
.\}
.nf
$ jose jwk thp \-i keys\&.jwkset \-f HYRNOxxOOHap0amTONoy1bHnS5M \-o key\&.jwk
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.sp
Nathaniel McCallum
.SH "SEE ALSO"
.sp
\fBjose\-alg\fR(1), \fBjose\-jwk\-gen\fR(1),