The sequence below shows the encoding of an encryption key:
EncryptionKey ::= SEQUENCE { keytype[0] INTEGER, keyvalue[1] OCTET STRING }
This field specifies the type of encryption key that follows in the keyvalue field. It will almost always correspond to the encryption algorithm used to generate the EncryptedData, though more than one algorithm may use the same type of key (the mapping is many to one). This might happen, for example, if the encryption algorithm uses an alternate checksum algorithm for an integrity check, or a different chaining mechanism.
This field contains the key itself, encoded as an octet string.
All negative values for the encryption key type are reserved for local use. All non-negative values are reserved for officially assigned type fields and interpretations.