1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- .\" generated with Ronn/v0.7.3
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
- .
- .TH "JOSE\-JWK\-EXC" "1" "June 2017" "" ""
- .
- .SH "NAME"
- \fBjose\-jwk\-exc\fR \- Performs a key exchange using the two input keys
- .
- .SH "SYNOPSIS"
- \fBjose jwk exc\fR [\-i JWK] \-l JWK \-r JWK [\-o JWK]
- .
- .SH "OVERVIEW"
- The \fBjose jwk exc\fR command performs a key exchange using the two input keys and provides the result of the exchange as output\. The user can specify a JWK template as input and the specified properties will appear in the output JWK unmodified\.
- .
- .P
- A key exchange requires two keys:
- .
- .IP "1." 4
- The local key, which usually contains private key material\.
- .
- .IP "2." 4
- The remote key, which usually contains public key material\.
- .
- .IP "" 0
- .
- .P
- The algorithm for the exchange is inferred from the inputs\.
- .
- .P
- The \fBECDH\fR algorithm performs a standard elliptic curve multiplication such that the public value of \ep rem is multiplied by the private value of \ep\.
- .
- .P
- The \fBECMR\fR algorithm has three modes of operation\. Where the local key has a private key (the "d" property), it performs exactly like \fBECDH\fR\. If the local key does not have a private key and the remote key does have a private key, elliptic curve addition is performed on the two values\. Otherwise, if neither the local key nor the remote key have a private key, the remote key is subtracted from the local key using elliptic curve subtraction\. When using ECMR, be sure to validate the content of your inputs to avoid triggering the incorrect operation!
- .
- .SH "OPTIONS"
- .
- .TP
- \fB\-i\fR \fIJSON\fR, \fB\-\-input\fR=\fIJSON\fR
- Parse JWK template from JSON
- .
- .TP
- \fB\-i\fR \fIFILE\fR, \fB\-\-input\fR=\fIFILE\fR
- Read JWK template from FILE
- .
- .TP
- \fB\-i\fR \-, \fB\-\-input\fR=\-
- Read JWK template from standard input
- .
- .TP
- \fB\-o\fR \fIFILE\fR, \fB\-\-output\fR=\fIFILE\fR
- Write JWK(Set) to FILE
- .
- .TP
- \fB\-o\fR \-, \fB\-\-output\fR=\-
- Write JWK(Set) to standard input
- .
- .TP
- \fB\-l\fR \fIFILE\fR, \fB\-\-local\fR=\fIFILE\fR
- Read local JWK from FILE
- .
- .TP
- \fB\-l\fR \-, \fB\-\-local\fR=\-
- Read local JWK from standard input
- .
- .TP
- \fB\-r\fR \fIFILE\fR, \fB\-\-remote\fR=\fIFILE\fR
- Read remote JWK from FILE
- .
- .TP
- \fB\-r\fR \-, \fB\-\-remote\fR=\-
- Read remote JWK from standard input
- .
- .SH "EXAMPLES"
- Perform a key exchange:
- .
- .IP "" 4
- .
- .nf
- $ jose jwk gen \-i \'{"alg":"ECDH"}\' \-o local\.jwk
- $ jose jwk gen \-i \'{"alg":"ECDH"}\' | jose jwk pub \-i\- \-o remote\.jwk
- $ jose jwk exc \-l local\.jwk \-r remote\.jwk \-o exchanged\.jwk
- .
- .fi
- .
- .IP "" 0
- .
- .SH "AUTHOR"
- Nathaniel McCallum <npmccallum@redhat\.com>
- .
- .SH "SEE ALSO"
- \fBjose\-alg\fR(1), \fBjose\-jwk\-exc\fR(1), \fBjose\-jwk\-gen\fR(1), \fBjose\-jwk\-pub\fR(1)
|