JOSE-JWS-SIG(1)
π jose-jws-sig(1) β like, the whole entire manual page, bestie
okay so real talk: this is the jose-jws-sig(1) page, and by the end of it you're gonna be signing payloads like it's nothing. no cap. π
β¨ NAME β¨
jose-jws-sig β signs a payload using one or more JWKs. that's it. that's the whole vibe. π
π¦ SYNOPSIS π¦
jose jws sig [-i JWS] [-I PAY] [-s SIG] -k JWK [-o JWS] [-O PAY] [-c]
look at her. iconic. every one of those flags matters, babe, we'll get to all of them. π«Ά
πΈ OVERVIEW πΈ
so the jose jws sig command signs a payload using one or more JWKs. the payload can show up in one of two ways: either in its decoded form (that's -I), or embedded inside an existing JWS (that's -i). pick your fighter. β
want a detached JWS? you're gonna specify the -O option. when you do that, the decoded payload gets written to the output you specified and it will not be included in the JWS. so the payload's like "i'm out, but my signature stayed" π
if you're only using one key (-k), then the resulting JWS may be output in JWS Compact Serialization by using the -c option. one key, one compact string, slay. π₯
this command uses a template based approach for constructing a JWS. you can specify templates of the JWS itself (-i) or for the JWS Signature Object (-r). attributes you specify in either of these templates will appear unmodified in the output. π
one exception to that rule, and it's important so listen up: the JWS Protected Header should be specified in its decoded form in the JWS Signature Object template. this command will automatically encode it as part of the encryption process. so you don't have to do it, she does it for you. π
now, if you specify a JOSE Header Parameter (via either the -i or -r options) that affects the construction of the JWE, this command will attempt to behave according to this parameter as if it were configuration. currently, jose will modify its behavior for the "alg" JOSE Header Parameter (see RFC 7515 Section 4.1.1). π§
but bestie, it is not necessary to provide any templates. jose jwe enc will automatically fill in the "alg" parameter by inferring the correct algorithm from the provided input JWKs. therefore, the -i and -r options should generally be used for providing extended JWE metadata. π
also, plot twist: it's possible to specify an existing JWS as the JWS template input (-i). this allows the addition of new signatures to an existing JWS. glow-up on top of a glow-up. π
π OPTIONS π
here she is, the full roster. all of them. no skips. π
-i JSON,--input=JSONβ parse the JWS template from JSON-i FILE,--input=FILEβ read the JWS template from FILE-i -,--input=-β read the JWS template from standard input-I FILE,--detached=FILEβ read the decoded payload from FILE-I -,--detached=-β read the decoded payload from standard input-s JSON,--signature=JSONβ parse the JWS signature template from JSON-s FILE,--signature=FILEβ read the JWS signature template from FILE-s -,--signature=-β read the JWS signature template from standard input-k FILE,--key=FILEβ read the JWK(Set) from FILE-k -,--key=-β read the JWK(Set) from standard input-o FILE,--output=FILEβ write the JWS to FILE-o -,--output=-β write the JWS to stdout (this is the default, fyi β¨)-O FILE,--detach=FILEβ detach the payload and decode it to FILE-O -,--detach=-β detach the payload and decode it to standard output-c,--compactβ output the JWS using compact serialization
side note bestie:-iis for the JWS template,-Iis for the payload,-sis for the signature template,-kis your key,-ois output,-Ois detach. capital letters are not the same as lowercase ones. do not mix them up. i'm begging. π
π EXAMPLES π
π sign data with a symmetric key using JWE JSON Serialization
$ jose jwk gen -i '{"alg":"HS256"}' -o key.jwk
$ jose jws sig -I msg.txt -k key.jwk -o msg.jws
you generate the key, you sign the thing. ate. π₯
π¦ sign data using detached JWE Compact Serialization
$ jose jws sig -I msg.txt -k key.jwk -O /dev/null -c -o msg.jws
/dev/null so the detached payload justβ¦ vanishes into the void. dramatic but valid. π
π sign with two keys
$ jose jwk gen -i '{"alg":"ES256"}' -o ec.jwk
$ jose jwk gen -i '{"alg":"RS256"}' -o rsa.jwk
$ jose jws sig -I msg.txt -k ec.jwk -k rsa.jwk -o msg.jws
two -k flags, two keys, one iconic signature situation. main character energy fr fr. π
π AUTHOR π
Nathaniel McCallum <npmccallum@redhat.com> β the icon, the legend. we stan. π«Ά
π§ SEE ALSO π§
jose-jws-sig(1)β yes, she references herself. self-aware queen. πjose-jws-ver(1)β the one who checks your work. go say hi.
and that's the whole page bestie!! you ate that π this lil masterpiece is from the JOSE-JWS-SIG(1) manual, dated 06/09/2026 β so go forth, sign responsibly, and remember: lowercase -i, capital -I, never ever confuse them. mwah. ππ
π¦ where this page comes from
- arch rolling: jose 15-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms