Subject: [jose] Allow compression of plain and JWS too?

From: "Vladimir Dzhuvinov / NimbusDS" <[email-masked]>
Date: Thu, 31 May 2012 05:01:48 -0700

Is there a reason to have compression only with JWE?

Vladimir

--
Vladimir Dzhuvinov : www.NimbusDS.com : [email-masked]

---

From: "Manger, James H" <[email-masked]>
Date: Fri, 1 Jun 2012 00:01:41 +1000

> Is there a reason to have compression only with JWE?

Compression should be available in signed and unprotected messages as well. Specifying the "zip" header element for signed JWsec messages (aka JWS) and unprotected JWsec messages (aka "alg":"none") would be a good approach.

The DEFLATE algorithm does a really good job of almost eliminating the 33% overhead introduced by a base64url encoding.
* DEFLATE(B64(random)) is only 1% longer than random
* DEFLATE(B64(DEFLATE(text))) is less than 1% longer than DEFLATE(text)
* DEFLATE(B64(text)) however is significantly longer than DEFLATE(text)

--
James Manger