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

From: "Vladimir Dzhuvinov / NimbusDS" <[email-masked]>
Date: Fri, 01 Jun 2012 04:51:57 -0700

Thanks for the figures James. This looks like a good case to make
DEFLATE a standard option for all messages types.

Vladimir

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

-------- Original Message --------
Subject: RE: [jose] Allow compression of plain and JWS too?
From: "Manger, James H" <[email-masked]>
Date: Thu, May 31, 2012 3:01 pm
To: Vladimir Dzhuvinov / NimbusDS <[email-masked]>,
"[email-masked]" <[email-masked]>

> 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