jose-jwe-dec.1.adoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. jose-jwe-dec(1)
  2. ===============
  3. :doctype: manpage
  4. == NAME
  5. jose-jwe-dec - Decrypts a JWE using the supplied JWKs
  6. == SYNOPSIS
  7. *jose jwe dec* -i JWE [-I CT] -k JWK [-p] [-O PT]
  8. == OVERVIEW
  9. The *jose jwe dec* command decrypts a JWE using one or more JWK (*-k*) or
  10. password (*-p*). Decryption succeeds if any key is able to perform decryption.
  11. If the JWE is a detached JWE, meaning that the ciphertext is stored in
  12. binary form external to the JWE itself, the ciphertext can be loaded using
  13. the *-I* parameter.
  14. Please note that, when specifying the *-O* option to output the plaintext,
  15. plaintext output begins before ciphertext validation. Therefore,
  16. you must check the return value of the command before using the data.
  17. == OPTIONS
  18. * *-i* _JSON_, *--input*=_JSON_ :
  19. Parse JWE from JSON
  20. * *-i* _FILE_, *--input*=_FILE_ :
  21. Read JWE from FILE
  22. * *-i* -, *--input*=- :
  23. Read JWE from standard input
  24. * *-I* _FILE_, *--detached*=_FILE_ :
  25. Read decoded ciphertext from FILE
  26. * *-I* -, *--detached*=- :
  27. Read decoded ciphertext from standard input
  28. * *-p*, *--password* :
  29. Prompt for a decryption password, if necessary
  30. * *-k* _FILE_, *--key*=_FILE_ :
  31. Read JWK(Set) from FILE
  32. * *-k* -, *--key=-* :
  33. Read JWK(Set) from standard input
  34. * *-O* _JSON_, *--detach*=_JSON_ :
  35. Parse JWE from JSON
  36. * *-O* _FILE_, *--detach*=_FILE_ :
  37. Read JWE from FILE
  38. * *-O* -, *--detach*=- :
  39. Read JWE from standard input
  40. == EXAMPLES
  41. Decrypt a JWE with a JWK:
  42. $ jose jwe dec -i msg.jwe -k rsa.key -O msg.txt
  43. Decrypt a JWE with a password:
  44. $ jose jwe dec -i msg.jwe -p -O msg.txt
  45. Please enter decryption password:
  46. Decrypt a JWE with either of two JWKs:
  47. $ jose jwe dec -i msg.jwe -k ec.jwk -k rsa.jwk -O msg.txt
  48. == AUTHOR
  49. Nathaniel McCallum <npmccallum@redhat.com>
  50. == SEE ALSO
  51. link:jose-jwe-enc.1.adoc[*jose-jwe-enc*(1)],
  52. link:jose-jwe-fmt.1.adoc[*jose-jwe-fmt*(1)]