Office Open XML (OOXML) Specification: Encryption

encryptionms-officeopenxmlpasswords

I am trying to understand how encrypted ("password protected") Office 2007 documents are bundled (specifically, Excel documents). I am experimenting with a known, password protected spread sheet.

When I unzip the XLSX file, I encounter three entries:

  • [6]DataSpaces (Directory)
  • EncryptionInfo (File)
  • EncryptedPackage (File)

How is the EncryptedPackage file encrypted (which cipher, which key derivation function, etc…)?

I have tried referencing the documentation, but I haven't had much success.

Best Answer

File encryption is not part of the OpenXML ECMA/ISO specifications. It's a vendor-specific standard on top of that. For the specification please check out

[MS-OFFCRYPTO]: Office Document Cryptography Structure Specification

Encrypted OpenXML documents are not stored as an OPC zip package but as an encrypted OPC package inside a compound OLE document.