XML signature (XMLDSig)

XML signature (XMLDSig): the W3C/IETF standard for embedding a digital signature in XML, and the base that XAdES builds on for eIDAS.

XML signature (XMLDSig) is the base standard for representing a digital signature as XML: it defines a Signature element and the rules for computing and checking it. The IETF specification, RFC 3275, published in March 2002, obsoletes an earlier, short-lived version of the same standard, RFC 3075, and a corresponding World Wide Web Consortium Recommendation was published with the same technical content, so the standard exists in parallel as an IETF and a W3C document.

In 2013, W3C published a second version, XML Signature Syntax and Processing Version 1.1, which keeps the same Signature element and canonicalisation model but updates the recommended cryptographic algorithms: it makes SHA-256 mandatory to implement, because SHA-1 - the hash RFC 3275 used by default - is now considered too weak and its use is discouraged.

Because two XML documents can differ byte for byte yet mean exactly the same thing (attribute order, whitespace, encoding), the standard signs a canonical form of the data rather than its raw bytes, using a process called XML canonicalization (C14N), so harmless formatting changes do not silently break a valid signature.

A Signature element always carries the same core parts, in a fixed order that the specification's own syntax lays down as Signature (SignedInfo, SignatureValue, KeyInfo?, Object*):

  • SignedInfo: the canonicalised list of what is signed, each entry identified by a hash
  • SignatureValue: the cryptographic signature computed over SignedInfo
  • KeyInfo: the key or certificate needed to verify the signature, often an X.509 certificate
  • Object: optional signed or unsigned data carried inside the signature element itself

The signed data can sit inside the same document, wrap around it, or live somewhere else entirely and be referenced by a URI - which is why XMLDSig can sign a database record, a message body or a plain file just as easily as an XML document.

Note: XMLDSig on its own only proves integrity and shows which key signed. Whether that is enough to count as an advanced electronic signature under eIDAS depends on further conditions set out in that entry; XAdES adds the certificate and signing-time information that make those conditions checkable, so a bare XMLDSig signature is not by itself an AdES format.

Frequently asked questions

Back to glossary