jose-jwe-dec1
Decrypts a jwe using the supplied jwks
Usage
jose jwe
dec
-i
JWE
[-I
CT]
-k
JWK
[-p]
[-O
PT]
Overview
The jose jwe dec command decrypts a JWE using one or more JWK (-k) or password (-p). Decryption succeeds if any key is able to perform decryption.
If the JWE is a detached JWE, meaning that the ciphertext is stored in binary form external to the JWE itself, the ciphertext can be loaded using the -I parameter.
Please note that, when specifying the -O option to output the plaintext, plaintext output begins before ciphertext validation. Therefore, you must check the return value of the command before using the data.
Options
• -i JSON, --input=JSON : Parse JWE from JSON
• -i FILE, --input=FILE : Read JWE from FILE
• -i -, --input=- : Read JWE from standard input
• -I FILE, --detached=FILE : Read decoded ciphertext from FILE
• -I -, --detached=- : Read decoded ciphertext from standard input
• -p, --password : Prompt for a decryption password, if necessary
• -k FILE, --key=FILE : Read JWK(Set) from FILE
• -k -, --key=- : Read JWK(Set) from standard input
• -O JSON, --detach=JSON : Parse JWE from JSON
• -O FILE, --detach=FILE : Read JWE from FILE
• -O -, --detach=- : Read JWE from standard input
Examples
Decrypt a JWE with a JWK:
$ jose jwe dec -i msg.jwe -k rsa.key -O msg.txt
Decrypt a JWE with a password:
$ jose jwe dec -i msg.jwe -p -O msg.txt Please enter decryption password:
Decrypt a JWE with either of two JWKs:
$ jose jwe dec -i msg.jwe -k ec.jwk -k rsa.jwk -O msg.txt
Releases
5 releases since Debian 10 (Buster); the text changed 3 times.
--detach until Debian 11 (Bullseye);
--detached until Debian 11 (Bullseye);
--input until Debian 11 (Bullseye);
--key until Debian 11 (Bullseye);
--password until Debian 11 (Bullseye);
-I until Debian 11 (Bullseye);
-O until Debian 11 (Bullseye);
-i until Debian 11 (Bullseye);
-k until Debian 11 (Bullseye);
-p until Debian 11 (Bullseye).