5 / 111
[MS-OFFCRYPTO] — v20130206
Office Document Cryptography Structure
Copyright © 2013 Microsoft Corporation.
Release: February 11, 2013
2.2.6 IRMDSTransformInfo ...................................................................................... 27
2.2.7 End-User License Stream ................................................................................ 28
2.2.8 LicenseID ...................................................................................................... 28
2.2.9 EndUserLicenseHeader .................................................................................... 28
2.2.10 Protected Content Stream ............................................................................. 29
2.2.11 Viewer Content Stream ................................................................................. 29
2.3 Encryption .......................................................................................................... 30
2.3.1 EncryptionHeaderFlags .................................................................................... 30
2.3.2 EncryptionHeader ........................................................................................... 31
2.3.3 EncryptionVerifier ........................................................................................... 33
2.3.4 ECMA-376 Document Encryption ...................................................................... 34
2.3.4.1 \0x06DataSpaces\DataSpaceMap Stream .................................................... 34
2.3.4.2 \0x06DataSpaces\DataSpaceInfo Storage .................................................... 35
2.3.4.3 \0x06DataSpaces\TransformInfo Storage .................................................... 35
2.3.4.4 \EncryptedPackage Stream ........................................................................ 35
2.3.4.5 \EncryptionInfo Stream (Standard Encryption) ............................................. 36
2.3.4.6 \EncryptionInfo Stream (Extensible Encryption)............................................ 37
2.3.4.7 ECMA-376 Document Encryption Key Generation (Standard Encryption) .......... 39
2.3.4.8 Password Verifier Generation (Standard Encryption) ..................................... 40
2.3.4.9 Password Verification (Standard Encryption) ................................................ 40
2.3.4.10 \EncryptionInfo Stream (Agile Encryption) ................................................. 41
2.3.4.11 Encryption Key Generation (Agile Encryption) ............................................. 47
2.3.4.12 Initialization Vector Generation (Agile Encryption) ....................................... 47
2.3.4.13 PasswordKeyEncryptor Generation (Agile Encryption) .................................. 48
2.3.4.14 DataIntegrity Generation (Agile Encryption) ............................................... 49
2.3.4.15 Data Encryption (Agile Encryption) ............................................................ 50
2.3.5 Office Binary Document RC4 CryptoAPI Encryption ............................................. 50
2.3.5.1 RC4 CryptoAPI Encryption Header............................................................... 50
2.3.5.2 RC4 CryptoAPI Encryption Key Generation ................................................... 51
2.3.5.3 RC4 CryptoAPI EncryptedStreamDescriptor Structure .................................... 52
2.3.5.4 RC4 CryptoAPI Encrypted Summary Stream ................................................. 53
2.3.5.5 Password Verifier Generation ..................................................................... 55
2.3.5.6 Password Verification ................................................................................ 55
2.3.6 Office Binary Document RC4 Encryption ............................................................ 55
2.3.6.1 RC4 Encryption Header .............................................................................. 55
2.3.6.2 Encryption Key Derivation .......................................................................... 56
2.3.6.3 Password Verifier Generation ..................................................................... 57
2.3.6.4 Password Verification ................................................................................ 57
2.3.7 XOR Obfuscation ............................................................................................ 57
2.3.7.1 Binary Document Password Verifier Derivation Method 1 ............................... 58
2.3.7.2 Binary Document XOR Array Initialization Method 1 ...................................... 58
2.3.7.3 Binary Document XOR Data Transformation Method 1 ................................... 60
2.3.7.4 Binary Document Password Verifier Derivation Method 2 ............................... 62
2.3.7.5 Binary Document XOR Array Initialization Method 2 ...................................... 62
2.3.7.6 Binary Document XOR Data Transformation Method 2 ................................... 63
2.3.7.7 Password Verification ................................................................................ 63
2.4 Document Write Protection ................................................................................... 64
2.4.1 ECMA-376 Document Write Protection .............................................................. 64
2.4.2 Binary Document Write Protection .................................................................... 64
2.4.2.1 Binary Document Write Protection Method 1 ................................................ 64
2.4.2.2 Binary Document Write Protection Method 2 ................................................ 64
2.4.2.3 Binary Document Write Protection Method 3 ................................................ 64
2.4.2.4 ISO Write Protection Method ...................................................................... 64