2.3.4.5 \EncryptionInfo Stream (Standard Encryption)

The \EncryptionInfo stream (1) contains detailed information that is used to initialize the cryptography used to encrypt the \EncryptedPackage stream (1), as specified in section 2.3.4.4, when standard encryption is used.

If an external encryption provider is used, see section 2.3.4.6.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

EncryptionVersionInfo

EncryptionHeader.Flags

EncryptionHeaderSize

EncryptionHeader (variable)

...

EncryptionVerifier (variable)

...

EncryptionVersionInfo (4 bytes): A Version structure (section 2.1.4) where Version.vMajor MUST be 0x0002, 0x0003 or 0x0004<9>, and Version.vMinor MUST be 0x0002.

EncryptionHeader.Flags (4 bytes): A copy of the Flags stored in the EncryptionHeader field of this structure.

EncryptionHeaderSize (4 bytes): An unsigned integer that specifies the size, in bytes, of the EncryptionHeader field of this structure.

EncryptionHeader (variable): An EncryptionHeader structure (section 2.3.2) that specifies parameters used to encrypt data. The values MUST be set as specified  in the following table.

Field

Value

Flags

The fCryptoAPI and fAES bits MUST be set. The fDocProps bit MUST be 0.

SizeExtra

This value MUST be 0x00000000.

AlgID

This value MUST be 0x0000660E (AES-128), 0x0000660F (AES-192), or 0x00006610 (AES-256).

AlgIDHash

This value MUST be 0x00008004 (SHA-1).

KeySize

This value MUST be 0x00000080 (AES-128), 0x000000C0 (AES-192), or 0x00000100 (AES-256).

ProviderType

This value SHOULD<10> be 0x00000018 (AES).

Reserved1

This value is undefined and MUST be ignored.

Reserved2

This value MUST be 0x00000000 and MUST be ignored.

CSPName

This value SHOULD<11> be set to either "Microsoft Enhanced RSA and AES Cryptographic Provider" or "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" as a null-terminated Unicode string.

EncryptionVerifier (variable): An EncryptionVerifier structure, as specified in section 2.3.3, that is generated as specified in section 2.3.4.8.