1
0

jose-jwk-exc.1.adoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. jose-jwk-exc(1)
  2. ===============
  3. :doctype: manpage
  4. == NAME
  5. jose-jwk-exc - Performs a key exchange using the two input keys
  6. == SYNOPSIS
  7. *jose jwk exc* [-i JWK] -l JWK -r JWK [-o JWK]
  8. == OVERVIEW
  9. The *jose jwk exc* command performs a key exchange using the two input keys
  10. and provides the result of the exchange as output. The user can specify a JWK
  11. template as input and the specified properties will appear in the output JWK
  12. unmodified.
  13. A key exchange requires two keys:
  14. 1. The local key, which usually contains private key material.
  15. 2. The remote key, which usually contains public key material.
  16. The algorithm for the exchange is inferred from the inputs.
  17. The *ECDH* algorithm performs a standard elliptic curve multiplication such
  18. that the public value of \p rem is multiplied by the private value of \p.
  19. The *ECMR* algorithm has three modes of operation. Where the local key has a
  20. private key (the "d" property), it performs exactly like *ECDH*. If the local
  21. key does not have a private key and the remote key does have a private key,
  22. elliptic curve addition is performed on the two values. Otherwise, if neither
  23. the local key nor the remote key have a private key, the remote key is
  24. subtracted from the local key using elliptic curve subtraction. When using
  25. ECMR, be sure to validate the content of your inputs to avoid triggering the
  26. incorrect operation!
  27. == OPTIONS
  28. * *-i* _JSON_, *--input*=_JSON_ :
  29. Parse JWK template from JSON
  30. * *-i* _FILE_, *--input*=_FILE_ :
  31. Read JWK template from FILE
  32. * *-i* -, *--input*=- :
  33. Read JWK template from standard input
  34. * *-o* _FILE_, *--output*=_FILE_ :
  35. Write JWK(Set) to FILE
  36. * *-o* -, *--output*=- :
  37. Write JWK(Set) to standard input
  38. * *-l* _FILE_, *--local*=_FILE_ :
  39. Read local JWK from FILE
  40. * *-l* -, *--local*=- :
  41. Read local JWK from standard input
  42. * *-r* _FILE_, *--remote*=_FILE_ :
  43. Read remote JWK from FILE
  44. * *-r* -, *--remote*=- :
  45. Read remote JWK from standard input
  46. == EXAMPLES
  47. Perform a key exchange:
  48. $ jose jwk gen -i '{"alg":"ECDH"}' -o local.jwk
  49. $ jose jwk gen -i '{"alg":"ECDH"}' | jose jwk pub -i- -o remote.jwk
  50. $ jose jwk exc -l local.jwk -r remote.jwk -o exchanged.jwk
  51. == AUTHOR
  52. Nathaniel McCallum <npmccallum@redhat.com>
  53. == SEE ALSO
  54. link:jose-alg.1.adoc[*jose-alg*(1)],
  55. link:jose-jwk-exc.1.adoc[*jose-jwk-exc*(1)],
  56. link:jose-jwk-gen.1.adoc[*jose-jwk-gen*(1)],
  57. link:jose-jwk-pub.1.adoc[*jose-jwk-pub*(1)]