Thanks for the pointers Axel.

I had actually looked at Compress.java and thought it was for the
previously specified zip=GZIP compression. 

While GZIP uses the DEFLATE alg for compression, it appends a different
set of headers to the stream. A good explanation of the difference I
found here:

http://stackoverflow.com/questions/388595/why-use-deflate-instead-of-gzip-for-text-files-served-by-apache#answer-9856879


With that difference taken into account, isn't
java.util.zip.Deflater{Input|Output}Stream the correct class to use
here?

Cheers,

Vladimir

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




-------- Original Message --------
Subject: RE: [jose] Example DEFLATE vectors for JWE?
From: <[email protected]>
Date: Mon, October 08, 2012 10:18 am
To: <[email protected]>, <[email protected]>

A JUNIT test from jsoncrypto.org is here:
https://code.google.com/p/jsoncrypto/source/browse/trunk/testsrc/org/jsoncrypto/JcBaseTest.java#1366
Although that does not contain fixed “strings”.
 
Beware that jsoncrypto uses the new 5-part jwe already (IV moved from
header to top level)
 
The JAVA implementation is here:
https://code.google.com/p/jsoncrypto/source/browse/trunk/src/org/jsoncrypto/util/Compress.java
 
The code was borrowed from this post: (claims to be compatible with
.net)
http://stackoverflow.com/questions/6717165/how-can-i-zip-and-unzip-a-string-using-gzipoutputstream-that-is-compatible-with
 
have fun
Axel
 
 
From: [email protected] [mailto:[email protected]] On Behalf Of
Vladimir Dzhuvinov / NimbusDS
Sent: Monday, October 08, 2012 10:20 AM
To: [email protected]
Subject: [jose] Example DEFLATE vectors for JWE?


 
Hi guys,

 

The new DEFLATE implementation in our Nimbus JOSE+JWT library seems to
be incorrect and I want to find out where the problem is. It would help
a lot of we had some example test vectors for that in the JWE appendix.

 

If anyone has been able to correctly implement DEFLATE in Java 6, please
get in touch.

 

Thanks,

 

Vladimir

 

--

Vladimir Dzhuvinov : www.NimbusDS.com : [email protected]
_______________________________________________
jose mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/jose

Reply via email to