I have to decode an XML encrypted document. The relevant part is:
<Master_key>
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
<KeyInfo>
<ds:KeyName>TK</ds:KeyName>
<ds:RetrievalMethod URI="#TK" Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey" />
</KeyInfo>
<CipherData>
<xenc:CipherValue>73CEFD0CE530C157C275152964EFBC322D26C2E356A3F3079E026FB2B6B562BD810043066300924078472229583118A8</xenc:CipherValue>
<xenc:FingerPrint>739E0E8490EACBCB2EA11D4A5DBEFBAE888B092E</xenc:FingerPrint>
</CipherData>
</Master_key>
The Master_Key is an encrypted element. aes256-cbc is used for encryption. The AES256 key is a session key and defined at the begin of the XML:
<Security>
<Transport_key Id="TK">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
<KeyInfo>
<ds:RetrievalMethod URI="#PKC" Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey" />
</KeyInfo>
<CipherData>
<xenc:CipherValue>968A0AFA54DAD4081FC264C90CD5F1341AD8274F130F5E9E8DC397B9FE3B7EC00FC72DD8C8A22B6E8A606B7693B80882777972D61316FD280A64D166DD0DA08748D285A2D4236DC92153C7A3ECF77580F380BE1A4E8B5E688BDB090A92B5C0CF3C1D90E00E73B4B50940195587DECB1ECF686B51C3C566D0BC36EA5EC0E87C32827EFFCDD3B5A91AF9AD0A0594527E43395CB6CC44653F60F9792505598709FE2C5F1BD21BAA8B6C9C02ADE354B7E8717BE999A11B6422F6C67B0D7A13C96051658C2B0315812DD772321E9820FEE73843C76869F65FE6327253A5BDD1255EF4DEA9B5A17DB54A5B7AEEA1DB4BEA018301E2CAB04B79A3EF81A419DB2B837404</xenc:CipherValue>
<xenc:FingerPrint>1F1862AFB4CC212C18439F12C1C3E6B615E70F65</xenc:FingerPrint>
</CipherData>
<CarriedKeyName>TK</CarriedKeyName>
</Transport_key>
</Security>
It is itself encrypted with rsa-1_5, based on a public key, for which the decrypter must have the private key.
I have to decrypt the content. Although I know the private key, I have no idea at the moment how to do that. In particular I'm wondering why the ciphered value
73CEFD0CE530C157C275152964EFBC322D26C2E356A3F3079E026FB2B6B562BD810043066300924078472229583118A8
is 48 Bytes long. Shouldn't it be a multiple of 32 Bytes, because AES256 uses a blocklength of 256bits=32bytes.
I would appreciate any help...