jose-jwk-exc.1 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .\" generated with Ronn/v0.7.3
  2. .\" http://github.com/rtomayko/ronn/tree/0.7.3
  3. .
  4. .TH "JOSE\-JWK\-EXC" "1" "June 2017" "" ""
  5. .
  6. .SH "NAME"
  7. \fBjose\-jwk\-exc\fR \- Performs a key exchange using the two input keys
  8. .
  9. .SH "SYNOPSIS"
  10. \fBjose jwk exc\fR [\-i JWK] \-l JWK \-r JWK [\-o JWK]
  11. .
  12. .SH "OVERVIEW"
  13. 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\.
  14. .
  15. .P
  16. A key exchange requires two keys:
  17. .
  18. .IP "1." 4
  19. The local key, which usually contains private key material\.
  20. .
  21. .IP "2." 4
  22. The remote key, which usually contains public key material\.
  23. .
  24. .IP "" 0
  25. .
  26. .P
  27. The algorithm for the exchange is inferred from the inputs\.
  28. .
  29. .P
  30. 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\.
  31. .
  32. .P
  33. 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!
  34. .
  35. .SH "OPTIONS"
  36. .
  37. .TP
  38. \fB\-i\fR \fIJSON\fR, \fB\-\-input\fR=\fIJSON\fR
  39. Parse JWK template from JSON
  40. .
  41. .TP
  42. \fB\-i\fR \fIFILE\fR, \fB\-\-input\fR=\fIFILE\fR
  43. Read JWK template from FILE
  44. .
  45. .TP
  46. \fB\-i\fR \-, \fB\-\-input\fR=\-
  47. Read JWK template from standard input
  48. .
  49. .TP
  50. \fB\-o\fR \fIFILE\fR, \fB\-\-output\fR=\fIFILE\fR
  51. Write JWK(Set) to FILE
  52. .
  53. .TP
  54. \fB\-o\fR \-, \fB\-\-output\fR=\-
  55. Write JWK(Set) to standard input
  56. .
  57. .TP
  58. \fB\-l\fR \fIFILE\fR, \fB\-\-local\fR=\fIFILE\fR
  59. Read local JWK from FILE
  60. .
  61. .TP
  62. \fB\-l\fR \-, \fB\-\-local\fR=\-
  63. Read local JWK from standard input
  64. .
  65. .TP
  66. \fB\-r\fR \fIFILE\fR, \fB\-\-remote\fR=\fIFILE\fR
  67. Read remote JWK from FILE
  68. .
  69. .TP
  70. \fB\-r\fR \-, \fB\-\-remote\fR=\-
  71. Read remote JWK from standard input
  72. .
  73. .SH "EXAMPLES"
  74. Perform a key exchange:
  75. .
  76. .IP "" 4
  77. .
  78. .nf
  79. $ jose jwk gen \-i \'{"alg":"ECDH"}\' \-o local\.jwk
  80. $ jose jwk gen \-i \'{"alg":"ECDH"}\' | jose jwk pub \-i\- \-o remote\.jwk
  81. $ jose jwk exc \-l local\.jwk \-r remote\.jwk \-o exchanged\.jwk
  82. .
  83. .fi
  84. .
  85. .IP "" 0
  86. .
  87. .SH "AUTHOR"
  88. Nathaniel McCallum <npmccallum@redhat\.com>
  89. .
  90. .SH "SEE ALSO"
  91. \fBjose\-alg\fR(1), \fBjose\-jwk\-exc\fR(1), \fBjose\-jwk\-gen\fR(1), \fBjose\-jwk\-pub\fR(1)