https://bugs.documentfoundation.org/show_bug.cgi?id=156835

            Bug ID: 156835
           Summary: FILEOPEN XLSX Password protected file with SHA-384
                    encryption does not open
           Product: LibreOffice
           Version: 24.2.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]
            Blocks: 143335

Created attachment 189063
  --> https://bugs.documentfoundation.org/attachment.cgi?id=189063&action=edit
Example file from Excel 2019

Attached user made file has file open password set in Excel 2019.
Calc can not open this file, considers it as broken.

1. Open attached file
-> after a bit of thinking, Calc says it can not be opened because it's
corrupt.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e60ef8651cfb30335471d1622e58c13eebc7d58b
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

The interesting part is in the EncryptedInfo file inside, here:

<keyData saltSize="16" blockSize="16" keyBits="128" hashSize="48"
cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA384" 

<p:encryptedKey spinCount="100000" saltSize="16" blockSize="16" keyBits="128"
hashSize="48" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC"
hashAlgorithm="SHA384" 

If I make a new similar password protected file in my Excel 2019 pro, then
these look like:

<keyData saltSize="16" blockSize="16" keyBits="256" hashSize="64"
cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA512" 

<p:encryptedKey spinCount="100000" saltSize="16" blockSize="16" keyBits="256"
hashSize="64" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC"
hashAlgorithm="SHA512"

and LO can open this file just fine. So my guess the relevant difference is the
SHA-384 vs SHA-512.

Note: this is not a duplicate of bug 148576 as Calc asks for the password of
the example file there, and the above xml look like:

<keyData saltSize="16" blockSize="16" keyBits="128" hashSize="20"
cipherAlgorithm="AES" cipherChaining="ChainingModeCBC" hashAlgorithm="SHA1" 

<p:encryptedKey spinCount="100000" saltSize="16" blockSize="16" keyBits="256"
hashSize="64" cipherAlgorithm="AES" cipherChaining="ChainingModeCBC"
hashAlgorithm="SHA512"


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=143335
[Bug 143335] [META] XLSX (OOXML) document protection issues
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to