Office Open XML(OOXML)规范:加密

时间:2022-09-23 08:39:23

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.

我试图了解如何捆绑加密(“密码保护”)Office 2007文档(特别是Excel文档)。我正在尝试使用已知的密码保护电子表格。

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

当我解压缩XLSX文件时,我遇到三个条目:

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

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

EncryptedPackage文件是如何加密的(哪个密码,哪个密钥派生函数等...)?

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

我试过引用文档,但我没有取得多大成功。

2 个解决方案

#1


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

文件加密不是OpenXML ECMA / ISO规范的一部分。它是一个特定于供应商的标准。有关规格,请查看

[MS-OFFCRYPTO]: Office Document Cryptography Structure Specification

[MS-OFFCRYPTO]:Office文档加密结构规范

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

加密的OpenXML文档不作为OPC zip包存储,而是作为复合OLE文档中的加密OPC包存储。

#2


I created a OoXmlCrypto stream wrapper, connecting several open source bits and pieces to access Office 2007 encrypted files easily.

我创建了一个OoXmlCrypto流包装器,连接几个开源的位和片段以轻松访问Office 2007加密文件。

This answer might be helpful.

这个答案可能会有所帮助。

Turns out [6]DataSpaces is ignored, but other two parts are used. The encrypted XLSX file is not really zipped, it's an OLE compound container. If you take out the parts, and zip them using 7zip, Excel does not open it.

结果[6]忽略了DataSpaces,但使用了其他两个部分。加密的XLSX文件没有真正压缩,它是一个OLE复合容器。如果您取出部件,并使用7zip压缩它们,Excel不会打开它。

#1


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

文件加密不是OpenXML ECMA / ISO规范的一部分。它是一个特定于供应商的标准。有关规格,请查看

[MS-OFFCRYPTO]: Office Document Cryptography Structure Specification

[MS-OFFCRYPTO]:Office文档加密结构规范

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

加密的OpenXML文档不作为OPC zip包存储,而是作为复合OLE文档中的加密OPC包存储。

#2


I created a OoXmlCrypto stream wrapper, connecting several open source bits and pieces to access Office 2007 encrypted files easily.

我创建了一个OoXmlCrypto流包装器,连接几个开源的位和片段以轻松访问Office 2007加密文件。

This answer might be helpful.

这个答案可能会有所帮助。

Turns out [6]DataSpaces is ignored, but other two parts are used. The encrypted XLSX file is not really zipped, it's an OLE compound container. If you take out the parts, and zip them using 7zip, Excel does not open it.

结果[6]忽略了DataSpaces,但使用了其他两个部分。加密的XLSX文件没有真正压缩,它是一个OLE复合容器。如果您取出部件,并使用7zip压缩它们,Excel不会打开它。