XML encrypted data structure

The XML Encryption Syntax and Processing candidate recommendation refers to the need to encapsulate all the information required to handle encrypted data efficiently. Such information includes details about the encryption method, and a reference to the key used to encrypt the data. Encrypting XML elements results in the replacement of those elements with <EncryptedData> elements. This section briefly describes the structure of an <EncryptedData> element in an XML document.

The following XML code fragment illustrates the basic structure of an <EncryptedData> element.

<EncryptedData>
<?xml version="1.0"?>
<xenc:EncryptedData Id="ED0" Type="http://www/w3.org/2002/04/xmlenc#Element"
xmlns:xenc="http://www.w3c.org/2001/04/xmlenc#">
<xenc:EncryptionMethod xenc:Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc">
<IV>JYZ86ne83lU4obBxANCFYA==</IV>
</xenc:EncryptionMethod>
<dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<xenc:EncryptedKey Id="EK0" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod xenc:Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p" />
<xenc:ReferenceList>
<xenc:DataReference URI="#ED0" />
</xenc:ReferenceList>
<dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<dsig:KeyName>cn=user A,o=Autobots,c=CA</dsig:KeyName>
<dsig:X509Data>
<dsig:X509IssuerSerial>
<dsig:X509IssuerName>o=Autobots,c=CA</dsig:X509IssuerName>
<dsig:X509SerialNumber>989942410</dsig:X509SerialNumber>
</dsig:X509IssuerSerial>
</dsig:X509Data>
</dsig:KeyInfo
<xenc:CipherData>
<xenc:CipherValue>AcBhYvM+KC4dSz6cYpVtXC93ju0Ex0xBa/aE1tWA=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedKey>
<xenc:RetrievalMethod Type="" URI="#EK0" />
</dsig:KeyInfo>
<xenc:CipherData>
<xenc:CipherValue>YNTlQEqTtBOYz8OODPyy/9Zhb78bSBj4wg9yHFYqkUCNanFVfmdzV4w1bgvFCYNhA+I1wzmD0EppajILKAiUKoTOUx/nPblmGfoh53rt3jAaqzR+qMJbQNanFVfmdzV4w1bgvR
YNTlQEqTtBOYz8OODPyy/9Zhb78bSBj4wg9yHFYqkUCNanFVfmdzV4w1bgvNanFVfmdzV4w1bgvb
FCYNhA+I1wzmD0EppajILKAiUKoTOUx/nPblmGfoh53rt3jAaqzR+qMJbQNanFVfmdzV4w1bgv=</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>