This document specifies how the XML Signature 2.0 transform model may be used with XML Encryption 1.1 for CipherReference processing.

This document summarizes the changes necessary to allow XML Encryption to use the transform model introduced in XML Signature 2.0. At some point the contents of this document may be incorporated into an XML Encryption 2.0 document, but are currently separate to highlight the limited set of changes, enabling easier review.


The XML Signature 2.0 [[!XMLDSIG-CORE2]] Transform processing model offers simplification to the XML Encryption 1.1 [[!XMLENC-CORE1]] CipherReference transform processing model.

The current model in XML Encryption 1.1 is that a CipherReference element specifies a URI attribute for obtaining content and may also optionally apply further transforms through the use of one or more Transform elements contained in a Transforms child of the CipherReference. The example in XML Encryption 1.1 shows use of an XPath transform to select a specific element within an XML document and then a base64 transform to decode the base64 to octets (two 1.1 transforms are applied).

This document is only applicable when transforms are applied in XML Encryption 1.1 to obtain cipher content, however this may be frequent when base64 decoding is required.

The 2.0 Transform model has a single fixed transform that supports a selection element, enabling the CipherReference processing model to be simplified (the 2.0 model also has other features that are not discussed in this document). The overall set of simplifications are as follows:

  1. Use the 2.0 Transform dsig2:Selection element with a URL attribute value that specifies the source of the cipher value, using XML fragments as appropriate. In the XML Encryption 1.1 example this removes the need for an XPath transform.

  2. Process the content retrieved from the URL source appropriately, as defined according to the dsig2:Selection Algorithm attribute. The type defined for base64 content encoded in XML is appropriate to the example in XML Encryption 1.1.

This approach entirely eliminates the use of transforms, apart from the backwardly-compatible mechanism of using the 2.0 Transform element to enable use of the 2.0 selection mechanism.


This example corresponds to the example shown in section 3.3.1 of XML Encryption 1.1.

  <CipherReference URI="">


      <ds:Transform Algorithm="">





Version recognition

Use of 2.0 transform processing can be recognized by examination of the Algorithm attribute value on the Transform element and seeing that it is the 2.0 value defined in XML Signature 2.0: "" .

This document is only applicable if it has a compatible value (this value or later).

CipherReference Processing with 2.0 Transform Model

CipherReference processing with the 2.0 transform model is only performed if the CipherReference element has a Transforms child element with a Transform child having an Algorithm attribute value consistent with 2.0 processing. The only current such value is "" .

If this is the case, it is an error if there is more than one Transforms child element of the CipherReference element or if there is more than one Transform child element of the Transforms element.

The dsig2:Selection element MUST be present as a child of the single Transform element. The URI attribute of the dsig2:Selection element MUST specify the source for the cipher data (and for content from within XML should specify the fragment if necessary, see 10.6.1 Selection of XML Documents or Fragments of XML Signature 2.0 for details)

If the cipher data is base64 encoded content within an XML source, the algorithm identifier MUST be specified as the dsig2:Selection Algorithm attribute value.

If the cipher data is binary (and not base64 encoded) content from the URI source, the algorithm identifier MUST be specified as the dsig2:Selection Algorithm attribute value.

No other Algorithm attribute value should be used.


This document specifies no change to the schema definition of the CipherReference element defined in XML Encryption 1.1, but the URI attribute of this element is ignored when the 2.0 transform processing model is used as described in this document.