OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

opendocument-users message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Understanding "STORED" files

I'm trying to decrypt an encrypted opendoc file (produced with OO.o 2). 

I have the bit about doing a SHA1 hash of the password, then running that 
through PBKDF2(HMAC-SHA-1) for 1024 cycles.

Then I decode each file (content.xml, styles.xml and settings.xml in my case) 
with Blowfish CFB. That results in an output file the same size as the input 
file. So far, so good.

Except I need to de-compress the resulting file. I see:
"Each file that is encrypted is compressed before being encrypted. To allow 
the contents of the package file to be verified, it is necessary that 
encrypted files are flagged as 'STORED' rather than 'DEFLATED'. As entries 
which are 'STORED' must have their size equal to the compressed size, it is 
necessary to store the uncompressed size in the manifest. The compressed size 
is stored in both the local file header and central directory record of the 
Zip file."

I don't get that. Any suggestions for the right zlib magic? Or even better, 
something in Qt?


PGP signature

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]