CINXE.COM

XML Signature Syntax and Processing Version 1.1

<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <title>XML Signature Syntax and Processing Version 1.1</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <!-- <script src='../../../dap-dev/ReSpec.js/js/respec.js' --> <!-- class='remove'></script> --> <style>/***************************************************************** * ReSpec 3 CSS * Robin Berjon - http://berjon.com/ *****************************************************************/ /* --- INLINES --- */ em.rfc2119 { text-transform: lowercase; font-variant: small-caps; font-style: normal; color: #900; } h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym, h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr { border: none; } dfn { font-weight: bold; } a.internalDFN { color: inherit; border-bottom: 1px solid #99c; text-decoration: none; } a.externalDFN { color: inherit; border-bottom: 1px dotted #ccc; text-decoration: none; } a.bibref { text-decoration: none; } cite .bibref { font-style: normal; } code { color: #ff4500; } /* --- --- */ ol.algorithm { counter-reset:numsection; list-style-type: none; } ol.algorithm li { margin: 0.5em 0; } ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; } /* --- TOC --- */ .toc a, .tof a { text-decoration: none; } a .secno, a .figno { color: #000; } ul.tof, ol.tof { list-style: none outside none; } .caption { margin-top: 0.5em; font-style: italic; } /* --- TABLE --- */ table.simple { border-spacing: 0; border-collapse: collapse; border-bottom: 3px solid #005a9c; } .simple th { background: #005a9c; color: #fff; padding: 3px 5px; text-align: left; } .simple th[scope="row"] { background: inherit; color: inherit; border-top: 1px solid #ddd; } .simple td { padding: 3px 10px; border-top: 1px solid #ddd; } .simple tr:nth-child(even) { background: #f0f6ff; } /* --- DL --- */ .section dd > p:first-child { margin-top: 0; } .section dd > p:last-child { margin-bottom: 0; } .section dd { margin-bottom: 1em; } .section dl.attrs dd, .section dl.eldef dd { margin-bottom: 0; } </style><style>/* --- EXAMPLES --- */ div.example-title { min-width: 7.5em; color: #b9ab2d; } div.example-title span { text-transform: uppercase; } aside.example, div.example, div.illegal-example { padding: 0.5em; margin: 1em 0; position: relative; clear: both; } div.illegal-example { color: red } div.illegal-example p { color: black } aside.example, div.example { padding: .5em; border-left-width: .5em; border-left-style: solid; border-color: #e0cb52; background: #fcfaee; } aside.example div.example { border-left-width: .1em; border-color: #999; background: #fff; } aside.example div.example div.example-title { color: #999; } </style><style>/* HIGHLIGHTS */ code.prettyprint { color: inherit; } /* this from google-code-prettify */ .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} </style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-REC"><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head> <body><div class="head"> <p> <a href="https://www.w3.org/"><img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C"></a> </p> <h1 class="title" id="title">XML Signature Syntax and Processing Version 1.1</h1> <h2 id="w3c-recommendation-11-april-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Recommendation 11 April 2013</h2> <dl> <dt>This version:</dt> <dd><a href="https://www.w3.org/TR/2013/REC-xmldsig-core1-20130411/">http://www.w3.org/TR/2013/REC-xmldsig-core1-20130411/</a></dd> <dt>Latest published version:</dt> <dd><a href="https://www.w3.org/TR/xmldsig-core1/">http://www.w3.org/TR/xmldsig-core1/</a></dd> <dt>Latest editor's draft:</dt> <dd><a href="https://www.w3.org/2008/xmlsec/Drafts/xmldsig-core-11/">http://www.w3.org/2008/xmlsec/Drafts/xmldsig-core-11/</a></dd> <dt>Previous version:</dt> <dd><a href="https://www.w3.org/TR/2013/PR-xmldsig-core1-20130124/">http://www.w3.org/TR/2013/PR-xmldsig-core1-20130124/</a></dd> <dt>Editors:</dt> <dd><span>Donald Eastlake</span>, <span class="ed_mailto"><a href="mailto:d3e3e3@gmail.com">d3e3e3@gmail.com</a></span></dd> <dd><span>Joseph Reagle</span>, <span class="ed_mailto"><a href="mailto:reagle@mit.edu">reagle@mit.edu</a></span></dd> <dd><span>David Solo</span>, <span class="ed_mailto"><a href="mailto:dsolo@alum.mit.edu">dsolo@alum.mit.edu</a></span></dd> <dd><span>Frederick Hirsch</span>, <span class="ed_mailto"><a href="mailto:frederick.hirsch@nokia.com">frederick.hirsch@nokia.com</a></span> (2nd edition, 1.1)</dd> <dd><span>Magnus Nyström</span>, <span class="ed_mailto"><a href="mailto:mnystrom@microsoft.com">mnystrom@microsoft.com</a></span> (1.1)</dd> <dd><span>Thomas Roessler</span>, <span class="ed_mailto"><a href="mailto:tlr@w3.org">tlr@w3.org</a></span> (2nd edition, 1.1)</dd> <dd><span>Kelvin Yiu</span>, <span class="ed_mailto"><a href="mailto:kelviny@microsoft.com">kelviny@microsoft.com</a></span> (1.1)</dd> <dt>Authors:</dt> <dd><span>Mark Bartel</span>, <span class="ed_mailto"><a href="mailto:mbartel@adobe.com">mbartel@adobe.com</a></span></dd> <dd><span>John Boyer</span>, <span class="ed_mailto"><a href="mailto:boyerj@ca.ibm.com">boyerj@ca.ibm.com</a></span></dd> <dd><span>Barb Fox</span>, <span class="ed_mailto"><a href="mailto:bfox@Exchange.Microsoft.com">bfox@Exchange.Microsoft.com</a></span></dd> <dd><span>Brian LaMacchia</span>, <span class="ed_mailto"><a href="mailto:bal@microsoft.com">bal@microsoft.com</a></span></dd> <dd><span>Ed Simon</span>, <span class="ed_mailto"><a href="mailto:edsimon@xmlsec.com">edsimon@xmlsec.com</a></span></dd> </dl> <p> Please refer to the <a href="https://www.w3.org/2008/xmlsec/errata/xmldsig-core-11-errata.html">errata</a> for this document, which may include some normative corrections. </p> <p> The English version of this specification is the only normative version. Non-normative <a href="https://www.w3.org/Consortium/Translation/">translations</a> may also be available. </p> <p class="copyright"> <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2013 <a href="http://trustee.ietf.org/">The IETF Trust</a> &amp; <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. <abbr title="World Wide Web Consortium">W3C</abbr> <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply. </p> <hr> </div> <section id="abstract" class="introductory"><h2>Abstract</h2> <p>This document specifies XML digital signature processing rules and syntax. XML Signatures provide <a href="#def-Integrity" class="link-def">integrity</a>, <a href="#def-AuthenticationMessage" class="link-def">message authentication</a>, and/or <a href="#def-AuthenticationSigner" class="link-def">signer authentication</a> services for data of any type, whether located within the XML that includes the signature or elsewhere.</p> </section><section id="sotd" class="introductory"><h2>Status of This Document</h2> <p><strong>Note</strong>: On 23 April 2013, the reference to the "Additional XML Security URIs" RFC was updated. The Director previously authorized the publication knowing that the reference would be updated in a near future.</p> <p> <em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at http://www.w3.org/TR/.</em> </p> <p>This document has been reviewed by <abbr title="World Wide Web Consortium">W3C</abbr> Members, by software developers, and by other <abbr title="World Wide Web Consortium">W3C</abbr> groups and interested parties, and is endorsed by the Director as a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation. It is a stable document and may be used as reference material or cited from another document. <abbr title="World Wide Web Consortium">W3C</abbr>'s role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.</p> <p>The <a href="https://www.w3.org/TR/2002/REC-xmldsig-core-20020212/">original version</a> of this specification was produced by the IETF/<abbr title="World Wide Web Consortium">W3C</abbr> <a href="https://www.w3.org/Signature/">XML Signature Working Group</a> ; the <a href="https://www.w3.org/Signature/2001/04/05-xmldsig-interop.html">Interoperability Report</a> shows at least 10 implementations with at least two interoperable implementations over every feature.</p> <p>The <a href="https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/">Second Edition</a> was produced by the <abbr title="World Wide Web Consortium">W3C</abbr> <a href="https://www.w3.org/2007/xmlsec/">XML Security Specifications Maintenance Working Group</a>, adding Canonical XML 1.1 as a required canonicalization algorithm and incorporating known errata. A <a href="https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/explain.html">detailed list of Second Edition changes</a> is available as is a <a href="https://www.w3.org/2007/xmlsec/interop/xmldsig/report.html">Second Edition implementation report</a> demonstrating four or more implementations of all new features.</p> <p>Conformance-affecting changes of XML Signature 1.1 against this previous recommendation mainly affect the set of mandatory to implement cryptographic algorithms, including Elliptic Curve DSA (and mark-up for corresponding key material), and additional hash algorithms. A detailed explanation of changes since the last Recommendation are available [<cite><a class="bibref" href="#bib-XMLDSIG-CORE1-CHGS">XMLDSIG-CORE1-CHGS</a></cite>]. Changes are also described in a <a href="Overview_diff_rec.html">diff document showing changes since the Second Edition</a>, as well as a <a href="Overview_diff.html">diff document showing changes since the previous PR draft</a>. </p> <p> Please refer to the <a href="https://www.w3.org/TR/2012/NOTE-xmldsig-core1-interop-20121113/">implementation report for version 1.1 of this specification</a> for additional details about the implementation status of features added in this revision. </p> <p> This document was published by the <a href="https://www.w3.org/2008/xmlsec/">XML Security Working Group</a> as a Recommendation. If you wish to make comments regarding this document, please send them to <a href="mailto:public-xmlsec@w3.org">public-xmlsec@w3.org</a> (<a href="mailto:public-xmlsec-request@w3.org?subject=subscribe">subscribe</a>, <a href="http://lists.w3.org/Archives/Public/public-xmlsec/">archives</a>). All comments are welcome. </p><p> This document was produced by a group operating under the <a href="https://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/42458/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>. </p> <p><a href="https://www.w3.org/2011/xmlsec-pag/pagreport.html">Additional information related to the IPR status of XML Signature 1.1</a> is available.</p> </section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#sec-Introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#sec-Editorial" class="tocxref"><span class="secno">1.1 </span>Conformance</a></li><li class="tocline"><a href="#sec-Design" class="tocxref"><span class="secno">1.2 </span>Design Philosophy</a></li><li class="tocline"><a href="#sec-Versions" class="tocxref"><span class="secno">1.3 </span>Versions, Namespaces and Identifiers</a></li><li class="tocline"><a href="#sec-Acknowledgements" class="tocxref"><span class="secno">1.4 </span> Acknowledgements</a></li></ul></li><li class="tocline"><a href="#sec-Overview" class="tocxref"><span class="secno">2. </span> Signature Overview and Examples</a><ul class="toc"><li class="tocline"><a href="#sec-o-Simple" class="tocxref"><span class="secno">2.1 </span> Simple Example (<code>Signature</code>, <code>SignedInfo</code>, <code>Methods</code>, and <code>Reference</code>s)</a><ul class="toc"><li class="tocline"><a href="#sec-o-Reference" class="tocxref"><span class="secno">2.1.1 </span>More on <code>Reference</code></a></li></ul></li><li class="tocline"><a href="#sec-o-SignatureProperty" class="tocxref"><span class="secno">2.2 </span>Extended Example (<code>Object</code> and <code>SignatureProperty</code>)</a></li><li class="tocline"><a href="#sec-o-Manifest" class="tocxref"><span class="secno">2.3 </span>Extended Example (<code>Object</code> and <code>Manifest</code>)</a></li></ul></li><li class="tocline"><a href="#sec-Processing" class="tocxref"><span class="secno">3. </span>Processing Rules</a><ul class="toc"><li class="tocline"><a href="#sec-CoreGeneration" class="tocxref"><span class="secno">3.1 </span>Signature Generation</a><ul class="toc"><li class="tocline"><a href="#sec-ReferenceGeneration" class="tocxref"><span class="secno">3.1.1 </span>Reference Generation</a></li><li class="tocline"><a href="#sec-SignatureGeneration" class="tocxref"><span class="secno">3.1.2 </span>Signature Generation</a></li></ul></li><li class="tocline"><a href="#sec-CoreValidation" class="tocxref"><span class="secno">3.2 </span>Core Validation</a><ul class="toc"><li class="tocline"><a href="#sec-ReferenceValidation" class="tocxref"><span class="secno">3.2.1 </span>Reference Validation</a></li><li class="tocline"><a href="#sec-SignatureValidation" class="tocxref"><span class="secno">3.2.2 </span>Signature Validation</a></li></ul></li></ul></li><li class="tocline"><a href="#sec-CoreSyntax" class="tocxref"><span class="secno">4. </span>Core Signature Syntax</a><ul class="toc"><li class="tocline"><a href="#sec-CryptoBinary" class="tocxref"><span class="secno">4.1 </span>The <code>ds:CryptoBinary</code> Simple Type</a></li><li class="tocline"><a href="#sec-Signature" class="tocxref"><span class="secno">4.2 </span>The <code>Signature</code> element</a></li><li class="tocline"><a href="#sec-SignatureValue" class="tocxref"><span class="secno">4.3 </span>The <code>SignatureValue</code> Element</a></li><li class="tocline"><a href="#sec-SignedInfo" class="tocxref"><span class="secno">4.4 </span>The <code>SignedInfo</code> Element</a><ul class="toc"><li class="tocline"><a href="#sec-CanonicalizationMethod" class="tocxref"><span class="secno">4.4.1 </span>The <code>CanonicalizationMethod</code> Element</a></li><li class="tocline"><a href="#sec-SignatureMethod" class="tocxref"><span class="secno">4.4.2 </span>The <code>SignatureMethod</code> Element</a></li><li class="tocline"><a href="#sec-Reference" class="tocxref"><span class="secno">4.4.3 </span>The <code>Reference</code> Element</a><ul class="toc"><li class="tocline"><a href="#sec-URI" class="tocxref"><span class="secno">4.4.3.1 </span>The <code>URI</code> Attribute</a></li><li class="tocline"><a href="#sec-ReferenceProcessingModel" class="tocxref"><span class="secno">4.4.3.2 </span>The Reference Processing Model</a></li><li class="tocline"><a href="#sec-Same-Document" class="tocxref"><span class="secno">4.4.3.3 </span>Same-Document URI-References</a></li><li class="tocline"><a href="#sec-Transforms" class="tocxref"><span class="secno">4.4.3.4 </span>The <code>Transforms</code> Element</a></li><li class="tocline"><a href="#sec-DigestMethod" class="tocxref"><span class="secno">4.4.3.5 </span>The <code>DigestMethod</code> Element</a></li><li class="tocline"><a href="#sec-DigestValue" class="tocxref"><span class="secno">4.4.3.6 </span>The <code>DigestValue</code> Element</a></li></ul></li></ul></li><li class="tocline"><a href="#sec-KeyInfo" class="tocxref"><span class="secno">4.5 </span>The <code>KeyInfo</code> Element</a><ul class="toc"><li class="tocline"><a href="#sec-KeyName" class="tocxref"><span class="secno">4.5.1 </span>The <code>KeyName</code> Element</a></li><li class="tocline"><a href="#sec-KeyValue" class="tocxref"><span class="secno">4.5.2 </span>The <code>KeyValue</code> Element</a><ul class="toc"><li class="tocline"><a href="#sec-DSAKeyValue" class="tocxref"><span class="secno">4.5.2.1 </span>The <code>DSAKeyValue</code> Element</a></li><li class="tocline"><a href="#sec-RSAKeyValue" class="tocxref"><span class="secno">4.5.2.2 </span>The <code>RSAKeyValue</code> Element</a></li><li class="tocline"><a href="#sec-ECKeyValue" class="tocxref"><span class="secno">4.5.2.3 </span>The <code>ECKeyValue</code> Element</a><ul class="toc"><li class="tocline"><a href="#sec-ECParameters" class="tocxref"><span class="secno">4.5.2.3.1 </span>Explicit Curve Parameters </a></li><li class="tocline"><a href="#sec-RFC4050Compat" class="tocxref"><span class="secno">4.5.2.3.2 </span>Compatibility with RFC 4050</a></li></ul></li></ul></li><li class="tocline"><a href="#sec-RetrievalMethod" class="tocxref"><span class="secno">4.5.3 </span>The <code>RetrievalMethod</code> Element</a></li><li class="tocline"><a href="#sec-X509Data" class="tocxref"><span class="secno">4.5.4 </span>The <code>X509Data</code> Element</a><ul class="toc"><li class="tocline"><a href="#dname-encrules" class="tocxref"><span class="secno">4.5.4.1 </span>Distinguished Name Encoding Rules</a></li></ul></li><li class="tocline"><a href="#sec-PGPData" class="tocxref"><span class="secno">4.5.5 </span>The <code>PGPData</code> Element</a></li><li class="tocline"><a href="#sec-SPKIData" class="tocxref"><span class="secno">4.5.6 </span>The <code>SPKIData</code> Element</a></li><li class="tocline"><a href="#sec-MgmtData" class="tocxref"><span class="secno">4.5.7 </span>The <code>MgmtData</code> Element</a></li><li class="tocline"><a href="#sec-keyconvenance" class="tocxref"><span class="secno">4.5.8 </span>XML Encryption <code>EncryptedKey</code> and <code>DerivedKey</code> Elements</a></li><li class="tocline"><a href="#sec-DEREncodedKeyValue" class="tocxref"><span class="secno">4.5.9 </span>The <code>DEREncodedKeyValue</code> Element</a></li><li class="tocline"><a href="#sec-KeyInfoReference" class="tocxref"><span class="secno">4.5.10 </span>The <code>KeyInfoReference</code> Element</a></li></ul></li><li class="tocline"><a href="#sec-Object" class="tocxref"><span class="secno">4.6 </span>The <code>Object</code> Element</a></li></ul></li><li class="tocline"><a href="#sec-AdditionalSyntax" class="tocxref"><span class="secno">5. </span>Additional Signature Syntax</a><ul class="toc"><li class="tocline"><a href="#sec-Manifest" class="tocxref"><span class="secno">5.1 </span>The <code>Manifest</code> Element</a></li><li class="tocline"><a href="#sec-SignatureProperties" class="tocxref"><span class="secno">5.2 </span>The <code>SignatureProperties</code> Element</a></li><li class="tocline"><a href="#sec-PI" class="tocxref"><span class="secno">5.3 </span>Processing Instructions in Signature Elements</a></li><li class="tocline"><a href="#sec-comments" class="tocxref"><span class="secno">5.4 </span>Comments in Signature Elements</a></li></ul></li><li class="tocline"><a href="#sec-Algorithms" class="tocxref"><span class="secno">6. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#sec-AlgID" class="tocxref"><span class="secno">6.1 </span>Algorithm Identifiers and Implementation Requirements</a></li><li class="tocline"><a href="#sec-MessageDigests" class="tocxref"><span class="secno">6.2 </span>Message Digests</a><ul class="toc"><li class="tocline"><a href="#sec-SHA-1" class="tocxref"><span class="secno">6.2.1 </span>SHA-1</a></li><li class="tocline"><a href="#sec-SHA-224" class="tocxref"><span class="secno">6.2.2 </span>SHA-224</a></li><li class="tocline"><a href="#sec-SHA-256" class="tocxref"><span class="secno">6.2.3 </span>SHA-256</a></li><li class="tocline"><a href="#sec-SHA-384" class="tocxref"><span class="secno">6.2.4 </span>SHA-384</a></li><li class="tocline"><a href="#sec-SHA-512" class="tocxref"><span class="secno">6.2.5 </span>SHA-512</a></li></ul></li><li class="tocline"><a href="#sec-MACs" class="tocxref"><span class="secno">6.3 </span>Message Authentication Codes</a><ul class="toc"><li class="tocline"><a href="#sec-HMAC" class="tocxref"><span class="secno">6.3.1 </span>HMAC</a></li></ul></li><li class="tocline"><a href="#sec-SignatureAlg" class="tocxref"><span class="secno">6.4 </span>Signature Algorithms</a><ul class="toc"><li class="tocline"><a href="#sec-DSA" class="tocxref"><span class="secno">6.4.1 </span>DSA</a></li><li class="tocline"><a href="#sec-PKCS1" class="tocxref"><span class="secno">6.4.2 </span>RSA (PKCS#1 v1.5)</a></li><li class="tocline"><a href="#sec-ECDSA" class="tocxref"><span class="secno">6.4.3 </span>ECDSA</a></li></ul></li><li class="tocline"><a href="#sec-c14nAlg" class="tocxref"><span class="secno">6.5 </span>Canonicalization Algorithms</a><ul class="toc"><li class="tocline"><a href="#sec-Canonical" class="tocxref"><span class="secno">6.5.1 </span>Canonical XML 1.0</a></li><li class="tocline"><a href="#sec-Canonical11" class="tocxref"><span class="secno">6.5.2 </span>Canonical XML 1.1</a></li><li class="tocline"><a href="#sec-ExcC14N10" class="tocxref"><span class="secno">6.5.3 </span>Exclusive XML Canonicalization 1.0</a></li></ul></li><li class="tocline"><a href="#sec-TransformAlg" class="tocxref"><span class="secno">6.6 </span><code>Transform</code> Algorithms</a><ul class="toc"><li class="tocline"><a href="#sec-Canonicalization" class="tocxref"><span class="secno">6.6.1 </span>Canonicalization</a></li><li class="tocline"><a href="#sec-Base-64" class="tocxref"><span class="secno">6.6.2 </span>Base64</a></li><li class="tocline"><a href="#sec-XPath" class="tocxref"><span class="secno">6.6.3 </span>XPath Filtering</a></li><li class="tocline"><a href="#sec-EnvelopedSignature" class="tocxref"><span class="secno">6.6.4 </span>Enveloped Signature Transform</a></li><li class="tocline"><a href="#sec-XSLT" class="tocxref"><span class="secno">6.6.5 </span>XSLT Transform</a></li></ul></li></ul></li><li class="tocline"><a href="#sec-XML-Canonicalization" class="tocxref"><span class="secno">7. </span>XML Canonicalization and Syntax Constraint Considerations</a><ul class="toc"><li class="tocline"><a href="#sec-XML-1" class="tocxref"><span class="secno">7.1 </span>XML 1.0 Syntax Constraints, and Canonicalization</a></li><li class="tocline"><a href="#sec-DOM-SAX" class="tocxref"><span class="secno">7.2 </span>DOM/SAX Processing and Canonicalization</a></li><li class="tocline"><a href="#sec-NamespaceContext" class="tocxref"><span class="secno">7.3 </span>Namespace Context and Portable Signatures</a></li></ul></li><li class="tocline"><a href="#sec-Security" class="tocxref"><span class="secno">8. </span>Security Considerations</a><ul class="toc"><li class="tocline"><a href="#sec-Security-Transforms" class="tocxref"><span class="secno">8.1 </span>Transforms</a><ul class="toc"><li class="tocline"><a href="#sec-Secure" class="tocxref"><span class="secno">8.1.1 </span>Only What is Signed is Secure</a></li><li class="tocline"><a href="#sec-Seen" class="tocxref"><span class="secno">8.1.2 </span>Only What is "Seen" Should be Signed</a></li><li class="tocline"><a href="#sec-See" class="tocxref"><span class="secno">8.1.3 </span>"See" What is Signed</a></li></ul></li><li class="tocline"><a href="#sec-Check" class="tocxref"><span class="secno">8.2 </span>Check the Security Model</a></li><li class="tocline"><a href="#sec-KeyLength" class="tocxref"><span class="secno">8.3 </span>Algorithms, Key Lengths, Certificates, Etc.</a></li><li class="tocline"><a href="#sec-Errors" class="tocxref"><span class="secno">8.4 </span>Error Messages</a></li></ul></li><li class="tocline"><a href="#sec-Schema" class="tocxref"><span class="secno">9. </span>Schema</a><ul class="toc"><li class="tocline"><a href="#sec-xsdSchema" class="tocxref"><span class="secno">9.1 </span>XSD Schema</a></li><li class="tocline"><a href="#sec-rngSchema" class="tocxref"><span class="secno">9.2 </span>RNG Schema</a></li></ul></li><li class="tocline"><a href="#sec-Definitions" class="tocxref"><span class="secno">10. </span>Definitions</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></section> <section id="sec-Introduction"> <!--OddPage--><h2><span class="secno">1. </span>Introduction</h2> <p> </p><p>This document specifies XML syntax and processing rules for creating and representing digital signatures. XML Signatures can be applied to any <a href="#def-DataObject" class="link-def">digital content (data object)</a>, including XML. An XML Signature may be applied to the content of one or more resources. <a href="#def-SignatureEnveloped" class="link-def">Enveloped</a> or <a href="#def-SignatureEnveloping" class="link-def">enveloping</a> signatures are over data within the same XML document as the signature; <a href="#def-SignatureDetached" class="link-def">detached</a> signatures are over data&nbsp;external to the signature element. More specifically, this specification defines an XML signature element type and an <a href="#def-SignatureApplication" class="link-def">XML signature application</a>; conformance requirements for each are specified by way of schema definitions and prose respectively. This specification also includes other useful types that identify methods for referencing collections of resources, algorithms, and keying and management information.</p> <p>The XML Signature is a method of associating a key with referenced data (octets); it does not normatively specify how keys are associated with persons or institutions, nor the meaning of the data being referenced and signed. Consequently, while this specification is an important component of secure XML applications, it itself is not sufficient to address all application security/trust concerns, particularly with respect to using signed XML (or other data formats) as a basis of human-to-human communication and agreement. Such an application must specify additional key, algorithm, processing and rendering requirements. For further information, please see see <a href="#sec-Security" class="sectionRef sec-ref">section 8. Security Considerations</a>. </p> <p> The Working Group encourages implementers and developers to read <cite>XML Signature Best Practices</cite> [<cite><a class="bibref" href="#bib-XMLDSIG-BESTPRACTICES">XMLDSIG-BESTPRACTICES</a></cite>]. It contains a number of best practices related to the use of XML Signature, including implementation considerations and practical ways of improving security. </p> <section id="sec-Editorial"> <h3><span class="secno">1.1 </span>Conformance</h3> <p>For readability, brevity, and historic reasons this document uses the term "signature" to generally refer to digital authentication values of all types. Obviously, the term is also strictly used to refer to authentication values that are based on public keys and that provide signer authentication. When specifically discussing authentication values based on symmetric secret key codes we use the terms authenticators or authentication codes. (See <a href="#sec-Check" class="sectionRef sec-ref">section 8.2 Check the Security Model</a>.)</p> <p>This specification provides a normative XML Schema [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>], [<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. The full normative grammar is defined by the XSD schema and the normative text in this specification. The standalone XSD schema file is authoritative in case there is any disagreement between it and the XSD schema portions in this specification. </p> <p>The key words "<em class="rfc2119" title="MUST">MUST</em>", "<em class="rfc2119" title="MUST NOT">MUST NOT</em>", "<em class="rfc2119" title="REQUIRED">REQUIRED</em>", "<em class="rfc2119" title="SHALL">SHALL</em>", "<em class="rfc2119" title="SHALL NOT">SHALL NOT</em>", "<em class="rfc2119" title="SHOULD">SHOULD</em>", "<em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em>", "<em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em>", "<em class="rfc2119" title="MAY">MAY</em>", and "<em class="rfc2119" title="OPTIONAL">OPTIONAL</em>" in this specification are to be interpreted as described in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].</p> <blockquote> <p>"They <em class="rfc2119" title="MUST">MUST</em> only be used where it is actually required for interoperation or to limit behavior which has potential for causing harm (e.g., limiting retransmissions)"</p> </blockquote> <p>Consequently, we use these capitalized key words to unambiguously specify requirements over protocol and application features and behavior that affect the interoperability and security of implementations. These key words are not used (capitalized) to describe XML grammar; schema definitions unambiguously describe such requirements and we wish to reserve the prominence of these terms for the natural language descriptions of protocols and features. For instance, an XML attribute might be described as being "optional." Compliance with the Namespaces in XML specification [<cite><a class="bibref" href="#bib-XML-NAMES">XML-NAMES</a></cite>] is described as "<em class="rfc2119" title="REQUIRED">REQUIRED</em>."</p> <p> This document specifies optional and mandatory to support algorithms, providing references for these algorithms. This means that a conformant implementation should for given inputs be able to produce outputs for those algorithms that interoperate as specified in the referenced specification. A conformant implementation may use any technique to achieve the results as-if it were implemented according to the referenced specification, but is not required to follow detailed implementation techniques of that specification. </p> </section> <section id="sec-Design"> <h3><span class="secno">1.2 </span>Design Philosophy</h3> <p>The design philosophy and requirements of this specification are addressed in the original XML-Signature Requirements document [<cite><a class="bibref" href="#bib-XMLDSIG-REQUIREMENTS">XMLDSIG-REQUIREMENTS</a></cite>] and the XML Security 1.1 Requirements document [<cite><a class="bibref" href="#bib-XMLSEC11-REQS">XMLSEC11-REQS</a></cite>].</p> </section> <section id="sec-Versions"> <h3><span class="secno">1.3 </span>Versions, Namespaces and Identifiers</h3> <p>This specification makes use of XML namespaces, and uses Uniform Resource Identifiers [<cite><a class="bibref" href="#bib-URI">URI</a></cite>] to identify resources, algorithms, and semantics.</p> <p>Implementations of this specification <em class="rfc2119" title="MUST">MUST</em> use the following XML namespace URIs:</p> <table class="namespaces"> <thead> <tr><th>URI</th><th>namespace prefix</th><th>XML internal entity</th></tr> </thead> <tbody> <tr><td><code>http://www.w3.org/2000/09/xmldsig#</code></td><td><i>default namespace</i>, <code>ds:</code>, <code>dsig:</code></td><td><code>&lt;!ENTITY dsig "http://www.w3.org/2000/09/xmldsig#"&gt;</code></td></tr> <tr><td><code>http://www.w3.org/2009/xmldsig11#</code></td><td><code>dsig11:</code></td><td><code>&lt;!ENTITY dsig11 "http://www.w3.org/2009/xmldsig11#"&gt;</code></td></tr> </tbody> </table> <p>While implementations <em class="rfc2119" title="MUST">MUST</em> support XML and XML namespaces, and while use of the above namespace URIs is <em class="rfc2119" title="REQUIRED">REQUIRED</em>, the namespace prefixes and entity declarations given are merely editorial conventions used in this document. Their use by implementations is <em class="rfc2119" title="OPTIONAL">OPTIONAL</em>.</p> <p>These namespace URIs are also used as the prefix for algorithm identifiers that are under control of this specification. For resources not under the control of this specification, we use the designated Uniform Resource Names [<cite><a class="bibref" href="#bib-URN">URN</a></cite>], [<cite><a class="bibref" href="#bib-RFC3406">RFC3406</a></cite>] or Uniform Resource Identifiers [<cite><a class="bibref" href="#bib-URI">URI</a></cite>] defined by the relevant normative external specification.</p> <p>The <code>http://www.w3.org/2000/09/xmldsig#</code> (<code>dsig:</code>) namespace was introduced in the first edition of this specification. This version does not coin any new elements or algorithm identifiers in that namespace; instead, the <code>http://www.w3.org/2009/xmldsig11#</code> (<code>dsig11:</code>) namespace is used.</p> <p>This specification uses algorithm identifiers in the namespace <code>http://www.w3.org/2001/04/xmldsig-more#</code> that were originally coined in [<cite><a class="bibref" href="#bib-RFC6931">RFC6931</a></cite>]. RFC 6931 associates these identifiers with specific algorithms. Implementations of this specification <em class="rfc2119" title="MUST">MUST</em> be fully interoperable with the algorithms specified in [<cite><a class="bibref" href="#bib-RFC6931">RFC6931</a></cite>], but <em class="rfc2119" title="MAY">MAY</em> compute the requisite values through any technique that leads to the same output.</p> <p>Examples of items in various namespaces include:</p> <dl> <dt style="font-weight: normal;"><code>SignatureProperties</code> is identified and defined by the <code>disg:</code> namespace</dt> <dd><code>http://www.w3.org/2000/09/xmldsig#SignatureProperties</code></dd> <dt style="font-weight: normal;"><code>ECKeyValue</code> is identified and defined by the <code>dsig11:</code> namespace</dt> <dd><code>http://www.w3.org/2009/xmldsig11#ECKeyValue</code></dd> <dt style="font-weight: normal;">XSLT is identified and defined by an external URI</dt> <dd><code>http://www.w3.org/TR/1999/REC-xslt-19991116</code></dd> <dt style="font-weight: normal;">SHA1 is identified via this specification's namespace and defined via a normative reference [<cite><a class="bibref" href="#bib-FIPS-180-3">FIPS-180-3</a></cite>]</dt> <dd>http://www.w3.org/2001/04/xmlenc#sha256</dd> <dd>FIPS PUB 180-3. <em>Secure Hash Standard.</em> U.S. Department of Commerce/National Institute of Standards and Technology.</dd> </dl> <p>No provision is made for an explicit version number in this syntax. If a future version of this specification requires explicit versioning of the document format, a different namespace will be used.</p> </section> <section id="sec-Acknowledgements"> <h3><span class="secno">1.4 </span> Acknowledgements</h3> <p>The contributions of the members of the XML Signature Working Group to the first edition specification are gratefully acknowledged: Mark Bartel, Adobe, was Accelio (Author); John Boyer, IBM (Author); Mariano P. Consens, University of Waterloo; John Cowan, Reuters Health; Donald Eastlake 3rd, Motorola&nbsp; (Chair, Author/Editor); Barb Fox, Microsoft (Author); Christian Geuer-Pollmann, University Siegen; Tom Gindin, IBM; Phillip Hallam-Baker, VeriSign Inc; Richard Himes, US Courts; Merlin Hughes, Baltimore; Gregor Karlinger, IAIK TU Graz; Brian LaMacchia, Microsoft (Author); Peter Lipp, IAIK TU Graz; Joseph Reagle, NYU, was <abbr title="World Wide Web Consortium">W3C</abbr> (Chair, Author/Editor); Ed Simon, XMLsec (Author); David Solo, Citigroup (Author/Editor); Petteri Stenius, Capslock; Raghavan Srinivas, Sun; Kent Tamura, IBM; Winchel Todd Vincent III, GSU; Carl Wallace, Corsec Security, Inc.; Greg Whitehead, Signio Inc.</p> <p>As are the first edition Last Call comments from the following:</p> <ul> <li>Dan Connolly, <abbr title="World Wide Web Consortium">W3C</abbr></li> <li>Paul Biron, Kaiser Permanente, on behalf of the <a href="https://www.w3.org/XML/Schema.html">XML Schema WG</a>.</li> <li>Martin J. Duerst, <abbr title="World Wide Web Consortium">W3C</abbr>; and Masahiro Sekiguchi, Fujitsu; on behalf of the <a href="https://www.w3.org/International/">Internationalization WG/IG</a>.</li> <li>Jonathan Marsh, Microsoft, on behalf of the <a href="https://www.w3.org/Style/XSL/">Extensible Stylesheet Language WG</a>.</li> </ul> <p>The following members of the XML Security Specification Maintenance Working Group contributed to the second edition: Juan Carlos Cruellas, Universitat Politècnica de Catalunya; Pratik Datta, Oracle Corporation; Phillip Hallam-Baker, VeriSign, Inc.; Frederick Hirsch, Nokia, (Chair, Editor); Konrad Lanz, Applied Information processing and Kommunications (IAIK); Hal Lockhart, BEA Systems, Inc.; Robert Miller, MITRE Corporation; Sean Mullan, Sun Microsystems, Inc.; Bruce Rich, IBM Corporation; Thomas Roessler, <abbr title="World Wide Web Consortium">W3C</abbr>/<abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr>, (Staff contact, Editor); Ed Simon, <abbr title="World Wide Web Consortium">W3C</abbr> Invited Expert; Greg Whitehead, HP.</p> <p>Contributions for version 1.1 were received from the members of the XML Security Working Group: Scott Cantor, Juan Carlos Cruellas, Pratik Datta, Gerald Edgar, Ken Graf, Phillip Hallam-Baker, Brad Hill, Frederick Hirsch (Chair, Editor), Brian LaMacchia, Konrad Lanz, Hal Lockhart, Cynthia Martin, Rob Miller, Sean Mullan, Shivaram Mysore, Magnus Nyström, Bruce Rich, Thomas Roessler (Staff contact, Editor), Ed Simon, Chris Solc, John Wray, Kelvin Yiu (Editor).</p> <p>The Working Group thanks Makoto Murata for assistance with the RELAX NG schemas.</p> </section> </section> <section id="sec-Overview"> <!--OddPage--><h2><span class="secno">2. </span> Signature Overview and Examples</h2> <p>This section provides an overview and examples of XML digital signature syntax. The specific processing is given in <a href="#sec-Processing" class="sectionRef sec-ref">section 3. Processing Rules</a>. The formal syntax is found in <a href="#sec-CoreSyntax" class="sectionRef sec-ref">section 4. Core Signature Syntax</a> and <a href="#sec-AdditionalSyntax" class="sectionRef sec-ref">section 5. Additional Signature Syntax</a>.</p> <p>In this section, an&nbsp;informal representation and examples are used to describe the structure of the XML signature syntax. This representation and examples may omit attributes, details and potential features that are fully explained later.</p> <p>XML Signatures are applied to arbitrary <a href="#def-DataObject" class="link-def">digital content (data objects)</a> via an indirection. Data objects are digested, the resulting value is placed in an element (with other information) and that element is then digested and cryptographically signed. XML digital signatures are represented by the <code> Signature</code> element which has the following structure (where "?" denotes zero or one occurrence; "+" denotes one or more occurrences; and "*" denotes zero or more occurrences):</p> <div><div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;Signature</span><span class="pln"> </span><span class="atn">ID</span><span class="pln">?</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;SignedInfo&gt;</span><span class="pln"> </span><span class="tag">&lt;CanonicalizationMethod</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;SignatureMethod</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> (</span><span class="tag">&lt;Reference</span><span class="pln"> </span><span class="atn">URI</span><span class="pln">? </span><span class="tag">&gt;</span><span class="pln"> (</span><span class="tag">&lt;Transforms&gt;</span><span class="pln">)? </span><span class="tag">&lt;DigestMethod&gt;</span><span class="pln"> </span><span class="tag">&lt;DigestValue&gt;</span><span class="pln"> </span><span class="tag">&lt;/Reference&gt;</span><span class="pln">)+ </span><span class="tag">&lt;/SignedInfo&gt;</span><span class="pln"> </span><span class="tag">&lt;SignatureValue&gt;</span><span class="pln"> (</span><span class="tag">&lt;KeyInfo&gt;</span><span class="pln">)? (</span><span class="tag">&lt;Object</span><span class="pln"> </span><span class="atn">ID</span><span class="pln">?</span><span class="tag">&gt;</span><span class="pln">)* </span><span class="tag">&lt;/Signature&gt;</span></pre></div></div> <p>Signatures are related to <a href="#def-DataObject" class="link-def">data objects</a> via URIs [<cite><a class="bibref" href="#bib-URI">URI</a></cite>]. Within an XML document, signatures are related to local data objects via fragment identifiers. Such local data can be included within an <a href="#def-SignatureEnveloping" class="link-def">enveloping</a> signature or can enclose an <a href="#def-SignatureEnveloped" class="link-def">enveloped</a> signature. <a href="#def-SignatureDetached" class="link-def">Detached signatures</a> are over external network resources or local data objects that reside within the same XML document as sibling elements; in this case, the signature is neither enveloping (signature is parent) nor enveloped (signature is child). Since a <code> Signature</code> element (and its <code>Id</code> attribute value/name) may co-exist or be combined with other elements (and their IDs) within a single XML document, care should be taken in choosing names such that there are no subsequent collisions that violate the <a href="https://www.w3.org/TR/REC-xml/#id"> ID uniqueness validity constraint</a> [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>].</p> <section id="sec-o-Simple"> <h3><span class="secno">2.1 </span> Simple Example (<code>Signature</code>, <code>SignedInfo</code>, <code>Methods</code>, and <code>Reference</code>s)</h3> <p>The following example is a detached signature of the content of the HTML4 in XML specification.</p> <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example highlight prettyprint"><span class="pun">[</span><span class="pln">s01</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Signature</span><span class="pln"> </span><span class="typ">Id</span><span class="pun">=</span><span class="str">"MyFirstSignature"</span><span class="pln"> xmlns</span><span class="pun">=</span><span class="str">"http://www.w3.org/2000/09/xmldsig#"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s02</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignedInfo</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s03</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">CanonicalizationMethod</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2006/12/xml-c14n11"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s04</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignatureMethod</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s05</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pln"> URI</span><span class="pun">=</span><span class="str">"http://www.w3.org/TR/2000/REC-xhtml1-20000126/"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s06</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transforms</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s07</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transform</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2006/12/xml-c14n11"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s08</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Transforms&gt; [s09] &lt;DigestMethod Algorithm="http:/</span><span class="pun">/</span><span class="pln">www</span><span class="pun">.</span><span class="pln">w3</span><span class="pun">.</span><span class="pln">org</span><span class="pun">/</span><span class="lit">2001</span><span class="pun">/</span><span class="lit">04</span><span class="pun">/</span><span class="pln">xmlenc</span><span class="com">#sha256"/&gt; </span><span class="pln"> </span><span class="pun">[</span><span class="pln">s10</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln">dGhpcyBpcyBub3QgYSBzaWduYXR1cmUK</span><span class="pun">...&lt;/</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s11</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Reference&gt; [s12] &lt;/</span><span class="typ">SignedInfo</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s13</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignatureValue</span><span class="pun">&gt;...&lt;/</span><span class="typ">SignatureValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s14</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">KeyInfo</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s15a</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">KeyValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s15b</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">DSAKeyValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s15c</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln">P</span><span class="pun">&gt;...&lt;/</span><span class="pln">P</span><span class="pun">&gt;&lt;</span><span class="pln">Q</span><span class="pun">&gt;...&lt;/</span><span class="pln">Q</span><span class="pun">&gt;&lt;</span><span class="pln">G</span><span class="pun">&gt;...&lt;/</span><span class="pln">G</span><span class="pun">&gt;&lt;</span><span class="pln">Y</span><span class="pun">&gt;...&lt;/</span><span class="pln">Y</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s15d</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/DSAKeyValue&gt; [s15e] &lt;/</span><span class="typ">KeyValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s16</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/KeyInfo&gt; [s17] &lt;/</span><span class="typ">Signature</span><span class="pun">&gt;</span></pre></div> <p><code>[s02-12]</code> The required <code>SignedInfo</code> element is the information that is actually signed. <a href="#def-ValidationCore" class="link-def">Core validation</a> of <code> SignedInfo</code> consists of two mandatory processes: <a href="#def-ValidationSignature" class="link-def">validation of the signature</a> over <code>SignedInfo</code> and <a href="#def-ValidationReference" class="link-def">validation of each <code>Reference</code></a> digest within <code>SignedInfo</code>. Note that the algorithms used in calculating the <code>SignatureValue</code> are also included in the signed information while the <code>SignatureValue</code> element is outside <code>SignedInfo</code>.</p> <p><code>[s03]</code> The <code>CanonicalizationMethod</code> is the algorithm that is used to canonicalize the <code>SignedInfo</code> element before it is digested as part of the signature operation. Note that this example is not in canonical form. (None of the examples in this specification are in canonical form.)</p> <p><code>[s04]</code> The <code>SignatureMethod</code> is the algorithm that is used to convert the canonicalized <code>SignedInfo</code> into the <code>SignatureValue</code>. It is a combination of a digest algorithm and a key dependent algorithm and possibly other algorithms such as padding, for example RSA-SHA1. The algorithm names are signed to resist attacks based on substituting a weaker algorithm. To promote application interoperability we specify a set of signature algorithms that <em class="rfc2119" title="MUST">MUST</em> be implemented, though their use is at the discretion of the signature creator. We specify additional algorithms as <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> or <em class="rfc2119" title="OPTIONAL">OPTIONAL</em> for implementation; the design also permits arbitrary user specified algorithms.</p> <p><code>[s05-11]</code> Each <code>Reference</code> element includes the digest method and resulting digest value calculated over the identified data object. It also may include transformations that produced the input to the digest operation. A data object is signed by computing its digest value and a signature over that value. The signature is later checked via <a href="#def-ValidationReference" class="link-def">reference</a> and <a href="#def-ValidationSignature" class="link-def">signature validation</a>.</p> <p><code>[s14-16]</code> <code>KeyInfo</code> indicates the key to be used to validate the signature. Possible forms for identification include certificates, key names, and key agreement algorithms and information -- we define only a few. <code>KeyInfo</code> is optional for two reasons. First, the signer may not wish to reveal key information to all document processing parties. Second, the information may be known within the application's context and need not be represented explicitly. Since <code>KeyInfo</code> is outside of <code> SignedInfo</code>, if the signer wishes to bind the keying information to the signature, a <code>Reference</code> can easily identify and include the <code> KeyInfo</code> as part of the signature. Use of <code>KeyInfo</code> is optional, however note that senders and receivers must agree on how it will be used through a mechanism out of scope for this specification. </p> <section id="sec-o-Reference"> <h4><span class="secno">2.1.1 </span>More on <code>Reference</code></h4> <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example highlight prettyprint"><span class="pun">[</span><span class="pln">s05</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pln"> URI</span><span class="pun">=</span><span class="str">"http://www.w3.org/TR/2000/REC-xhtml1-20000126/"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s06</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transforms</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s07</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transform</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2006/12/xml-c14n11"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s08</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Transforms&gt; [s09] &lt;DigestMethod Algorithm="http:/</span><span class="pun">/</span><span class="pln">www</span><span class="pun">.</span><span class="pln">w3</span><span class="pun">.</span><span class="pln">org</span><span class="pun">/</span><span class="lit">2001</span><span class="pun">/</span><span class="lit">04</span><span class="pun">/</span><span class="pln">xmlenc</span><span class="com">#sha256"/&gt; </span><span class="pln"> </span><span class="pun">[</span><span class="pln">s10</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln">dGhpcyBpcyBub3QgYSBzaWduYXR1cmUK</span><span class="pun">...&lt;/</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">s11</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;/</span><span class="typ">Reference</span><span class="pun">&gt;</span></pre></div> <p><code>[s05]</code> The optional <code>URI</code> attribute of <code>Reference</code> identifies the data object to be signed. This attribute may be omitted on at most one <code>Reference</code> in a <code>Signature</code>. (This limitation is imposed in order to ensure that references and objects may be matched unambiguously.)</p> <p><code>[s05-08]</code> This identification, along with the transforms, is a description provided by the signer on how they obtained the signed data object in the form it was digested (i.e. the digested content). The verifier may obtain the digested content in another method so long as the digest verifies. In particular, the verifier may obtain the content from a different location such as a local store than that specified in the <code>URI</code>.</p> <p><code>[s06-08] Transforms</code> is an optional ordered list of processing steps that were applied to the resource's content before it was digested. Transforms can include operations such as canonicalization, encoding/decoding (including compression/inflation), XSLT, XPath, XML schema validation, or XInclude. XPath transforms permit the signer to derive an XML document that omits portions of the source document. Consequently those excluded portions can change without affecting signature validity. For example, if the resource being signed encloses the signature itself, such a transform must be used to exclude the signature value from its own computation. If no <code>Transforms</code> element is present, the resource's content is digested directly. While the Working Group has specified mandatory (and optional) canonicalization and decoding algorithms, user specified transforms are permitted.</p> <p><code>[s09-10] DigestMethod</code> is the algorithm applied to the data after <code>Transforms</code> is applied (if specified) to yield the <code> DigestValue</code>. The signing of the <code>DigestValue</code> is what binds the content of a resource to the signer's key.</p> </section> </section> <section id="sec-o-SignatureProperty"> <h3><span class="secno">2.2 </span>Extended Example (<code>Object</code> and <code>SignatureProperty</code>)</h3> <p>This specification does not address mechanisms for making statements or assertions. Instead, this document defines what it means for something to be signed by an XML Signature (<a href="#def-Integrity" class="link-def">integrity</a>, <a href="#def-AuthenticationMessage" class="link-def">message authentication</a>, and/or <a href="#def-AuthenticationSigner" class="link-def">signer authentication</a>). Applications that wish to represent other semantics must rely upon other technologies, such as [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>], [<cite><a class="bibref" href="#bib-RDF-PRIMER">RDF-PRIMER</a></cite>]. For instance, an application might use a <code>foo:assuredby</code> attribute within its own markup to reference a <code> Signature</code> element. Consequently, it's the application that must understand and know how to make trust decisions given the validity of the signature and the meaning of <code>assuredby</code> syntax. We also define a <code>SignatureProperties</code> element type for the inclusion of assertions about the signature itself (e.g., signature semantics, the time of signing or the serial number of hardware used in cryptographic processes). Such assertions may be signed by including a <code>Reference</code> for the <code>SignatureProperties</code> in <code>SignedInfo</code>. While the signing application should be very careful about what it signs (it should understand what is in the <code>SignatureProperty</code>) a receiving application has no obligation to understand that semantic (though its parent trust engine may wish to). Any content about the signature generation may be located within the <code> SignatureProperty</code> element. The mandatory <code>Target</code> attribute references the <code>Signature</code> element to which the property applies.</p> <p>Consider the preceding example with an additional reference to a local <code> Object</code> that includes a <code>SignatureProperty</code> element. (Such a signature would not only be <a href="#def-SignatureDetached" class="link-def">detached</a> <code>[p02]</code> but <a href="#def-SignatureEnveloping" class="link-def">enveloping</a> <code>[p03]</code>.)</p> <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example highlight prettyprint"><span class="pun">[</span><span class="pln"> </span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Signature</span><span class="pln"> </span><span class="typ">Id</span><span class="pun">=</span><span class="str">"MySecondSignature"</span><span class="pln"> </span><span class="pun">...&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p01</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignedInfo</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln"> </span><span class="pun">]</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p02</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pln"> URI</span><span class="pun">=</span><span class="str">"http://www.w3.org/TR/xml-stylesheet/"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln"> </span><span class="pun">]</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p03</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pln"> URI</span><span class="pun">=</span><span class="str">"#AMadeUpTimeStamp"</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p04</span><span class="pun">]</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">=</span><span class="str">"http://www.w3.org/2000/09/xmldsig#SignatureProperties"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p05</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transforms</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p06</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transform</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2006/12/xml-c14n11"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p07</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Transforms&gt; [p08] &lt;DigestMethod Algorithm="http:/</span><span class="pun">/</span><span class="pln">www</span><span class="pun">.</span><span class="pln">w3</span><span class="pun">.</span><span class="pln">org</span><span class="pun">/</span><span class="lit">2001</span><span class="pun">/</span><span class="lit">04</span><span class="pun">/</span><span class="pln">xmlenc</span><span class="com">#sha256"/&gt; </span><span class="pln"> </span><span class="pun">[</span><span class="pln">p09</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln">dGhpcyBpcyBub3QgYSBzaWduYXR1cmUK</span><span class="pun">...&lt;/</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p10</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Reference&gt; [p11] &lt;/</span><span class="typ">SignedInfo</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p12</span><span class="pun">]</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p13</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Object</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p14</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignatureProperties</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p15</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">SignatureProperty</span><span class="pln"> </span><span class="typ">Id</span><span class="pun">=</span><span class="str">"AMadeUpTimeStamp"</span><span class="pln"> </span><span class="typ">Target</span><span class="pun">=</span><span class="str">"#MySecondSignature"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p16</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="pln">timestamp xmlns</span><span class="pun">=</span><span class="str">"http://www.ietf.org/rfcXXXX.txt"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p17</span><span class="pun">]</span><span class="pln"> </span><span class="str">&lt;date&gt;</span><span class="lit">19990914</span><span class="pun">&lt;</span><span class="str">/date&gt; [p18] &lt;time&gt;14:34:34:34&lt;/</span><span class="pln">time</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p19</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/timestamp&gt; [p20] &lt;/</span><span class="typ">SignatureProperty</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p21</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/SignatureProperties&gt; [p22] &lt;/</span><span class="typ">Object</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">p23</span><span class="pun">]&lt;/</span><span class="typ">Signature</span><span class="pun">&gt;</span></pre></div> <p><code>[p04]</code> The optional <code>Type</code> attribute of <code>Reference</code> provides information about the resource identified by the <code>URI</code>. In particular, it can indicate that it is an <code> Object</code>, <code>SignatureProperty</code>, or <code>Manifest</code> element. This can be used by applications to initiate special processing of some <code>Reference</code> elements. References to an XML data element within an <code>Object</code> element <em class="rfc2119" title="SHOULD">SHOULD</em> identify the actual element pointed to. Where the element content is not XML (perhaps it is binary or encoded data) the reference should identify the <code>Object</code> and the <code>Reference</code> <code>Type</code>, if given, <em class="rfc2119" title="SHOULD">SHOULD</em> indicate <code> Object</code>. Note that <code>Type</code> is advisory and no action based on it or checking of its correctness is required by core behavior.</p> <p><code>[p13]</code> <code>Object</code> is an optional element for including data objects within the signature element or elsewhere. The <code>Object</code> can be optionally typed and/or encoded.</p> <p><code>[p14-21]</code> Signature properties, such as time of signing, can be optionally signed by identifying them from within a <code>Reference</code>. (These properties are traditionally called signature "attributes" although that term has no relationship to the XML term "attribute".)</p> </section> <section id="sec-o-Manifest"> <h3><span class="secno">2.3 </span>Extended Example (<code>Object</code> and <code>Manifest</code>)</h3> <p>The <code>Manifest</code> element is provided to meet additional requirements not directly addressed by the mandatory parts of this specification. Two requirements and the way the <code>Manifest</code> satisfies them follow.</p> <p>First, applications frequently need to efficiently sign multiple data objects even where the signature operation itself is an expensive public key signature. This requirement can be met by including multiple <code>Reference</code> elements within <code>SignedInfo</code> since the inclusion of each digest secures the data digested. However, some applications may not want the <a href="#def-ValidationCore" class="link-def">core validation</a> behavior associated with this approach because it requires every <code>Reference</code> within <code>SignedInfo</code> to undergo <a href="#def-ValidationReference" class="link-def">reference validation</a> -- the <code>DigestValue</code> elements are checked. These applications may wish to reserve reference validation decision logic to themselves. For example, an application might receive a <a href="#def-ValidationSignature" class="link-def">signature valid</a> <code>SignedInfo</code> element that includes three <code>Reference</code> elements. If a single <code>Reference</code> fails (the identified data object when digested does not yield the specified <code>DigestValue</code>) the signature would fail <a href="#def-ValidationCore" class="link-def">core validation</a>. However, the application may wish to treat the signature over the two valid <code>Reference</code> elements as valid or take different actions depending on which fails.&nbsp; To accomplish this, <code>SignedInfo</code> would reference a <code>Manifest</code> element that contains one or more <code>Reference</code> elements (with the same structure as those in <code>SignedInfo</code>). Then, reference validation of the <code>Manifest</code> is under application control.</p> <p>Second, consider an application where many signatures (using different keys) are applied to a large number of documents. An inefficient solution is to have a separate signature (per key) repeatedly applied to a large <code> SignedInfo</code> element (with many <code>Reference</code>s); this is wasteful and redundant. A more efficient solution is to include many references in a single <code>Manifest</code> that is then referenced from multiple <code>Signature</code> elements.</p> <p>The example below includes a <code>Reference</code> that signs a <code> Manifest</code> found within the <code>Object</code> element.</p> <div class="example"><div class="example-title"><span>Example 5</span></div><pre class="example highlight prettyprint"><span class="pun">[</span><span class="pln"> </span><span class="pun">]</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m01</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pln"> URI</span><span class="pun">=</span><span class="str">"#MyFirstManifest"</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m02</span><span class="pun">]</span><span class="pln"> </span><span class="typ">Type</span><span class="pun">=</span><span class="str">"http://www.w3.org/2000/09/xmldsig#Manifest"</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m03</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transforms</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m04</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Transform</span><span class="pln"> </span><span class="typ">Algorithm</span><span class="pun">=</span><span class="str">"http://www.w3.org/2006/12/xml-c14n11"</span><span class="pun">/&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m05</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Transforms&gt; [m06] &lt;DigestMethod Algorithm="http:/</span><span class="pun">/</span><span class="pln">www</span><span class="pun">.</span><span class="pln">w3</span><span class="pun">.</span><span class="pln">org</span><span class="pun">/</span><span class="lit">2001</span><span class="pun">/</span><span class="lit">04</span><span class="pun">/</span><span class="pln">xmlenc</span><span class="com">#sha256"/&gt; </span><span class="pln"> </span><span class="pun">[</span><span class="pln">m07</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln">dGhpcyBpcyBub3QgYSBzaWduYXR1cmUK</span><span class="pun">...=&lt;/</span><span class="typ">DigestValue</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m08</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Reference&gt; [ ] ... [m09] &lt;Object&gt; [m10] &lt;Manifest Id="MyFirstManifest"&gt; [m11] &lt;Reference&gt; [m12] ... [m13] &lt;/</span><span class="typ">Reference</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m14</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="typ">Reference</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m15</span><span class="pun">]</span><span class="pln"> </span><span class="pun">...</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m16</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;</span><span class="str">/Reference&gt; [m17] &lt;/</span><span class="typ">Manifest</span><span class="pun">&gt;</span><span class="pln"> </span><span class="pun">[</span><span class="pln">m18</span><span class="pun">]</span><span class="pln"> </span><span class="pun">&lt;/</span><span class="typ">Object</span><span class="pun">&gt;</span></pre></div> </section> </section> <section id="sec-Processing"> <!--OddPage--><h2><span class="secno">3. </span>Processing Rules</h2> <p>The sections below describe the operations to be performed as part of signature generation and validation.</p> <section id="sec-CoreGeneration"> <h3><span class="secno">3.1 </span>Signature Generation</h3> <p>The <em class="rfc2119" title="REQUIRED">REQUIRED</em> steps include the generation of <code>Reference</code> elements and the <code>SignatureValue</code> over <code>SignedInfo</code>.</p> <section id="sec-ReferenceGeneration"> <h4><span class="secno">3.1.1 </span>Reference Generation</h4> <p>For each data object being signed:</p> <ol> <li>Apply the <code>Transforms</code>, as determined by the application, to the data object.</li> <li>Calculate the digest value over the resulting data object.</li> <li>Create a <code>Reference</code> element, including the (optional) identification of the data object, any (optional) transform elements, the digest algorithm and the <code>DigestValue</code>. (Note, it is the canonical form of these references that are signed in <a href="#sec-SignatureGeneration" class="sectionRef sec-ref">section 3.1.2 Signature Generation</a> and validated in <a href="#sec-ReferenceValidation" class="sectionRef sec-ref">section 3.2.1 Reference Validation</a>.)</li> </ol> The Reference Processing Model (<a href="#sec-ReferenceProcessingModel" class="sectionRef sec-ref">section 4.4.3.2 The Reference Processing Model</a>) requires use of Canonical XML 1.0 [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] as default processing behavior when a transformation is expecting an octet-stream, but the data object resulting from URI dereferencing or from the previous transformation in the list of <code> Transform</code> elements is a node-set. We RECOMMEND that, when generating signatures, signature applications do not rely on this default behavior, but explicitly identify the transformation that is applied to perform this mapping. In cases in which inclusive canonicalization is desired, we RECOMMEND that Canonical XML 1.1 [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>] be used.<!-- <ins> <p class="discuss">< id="EdNote-C14N11-AppendixA1"> Editors Note</a>: There has been a correction to Appendix A of the C14N11 Candidate Recommendation. This correction is available at <a href="http://lists.w3.org/Archives/Public/public-xml-core-wg/2007Jun/att-0050/Apendix_20060625.html"> http://lists.w3.org/Archives/Public/public-xml-core-wg/2007Jun/att-0050/Apendix_20060625.html</a>. The XML Security Specifications Maintenance WG anticipates this change will be adopted as part of C14N11 CR review and will use this update to Appendix A for Interop testing. </p> </ins> --> </section> <section id="sec-SignatureGeneration"> <h4><span class="secno">3.1.2 </span>Signature Generation</h4> <ol> <li>Create <code>SignedInfo</code> element with <code>SignatureMethod</code>, <code>CanonicalizationMethod</code> and <code>Reference</code>(s).</li> <li>Canonicalize and then calculate the <code>SignatureValue</code> over <code>SignedInfo</code> based on algorithms specified in <code>SignedInfo</code>.</li> <li>Construct the <code>Signature</code> element that includes <code>SignedInfo</code>, <code>Object</code>(s) (if desired, encoding may be different than that used for signing), <code>KeyInfo</code> (if required), and <code>SignatureValue</code>. <p>Note, if the <code>Signature</code> includes same-document references, [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>] or [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>], [<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>] validation of the document might introduce changes that break the signature. Consequently, applications should be careful to consistently process the document or refrain from using external contributions (e.g., defaults and entities).</p> </li> </ol> </section> </section> <section id="sec-CoreValidation"> <h3><span class="secno">3.2 </span>Core Validation</h3> <p>The <em class="rfc2119" title="REQUIRED">REQUIRED</em> steps of <a href="#def-ValidationCore" class="link-def">core validation</a> include (1) <a href="#def-ValidationReference" class="link-def">reference validation</a>, the verification of the digest contained in each <code>Reference</code> in <code>SignedInfo</code>, and (2) the cryptographic <a href="#def-ValidationSignature" class="link-def">signature validation</a> of the signature calculated over <code>SignedInfo</code>.</p> <p>Note, there may be valid signatures that some signature applications are unable to validate. Reasons for this include failure to implement optional parts of this specification, inability or unwillingness to execute specified algorithms, or inability or unwillingness to dereference specified URIs (some URI schemes may cause undesirable side effects), etc.</p> <p>Comparison of each value in reference and signature validation is over the numeric (e.g., integer) or decoded octet sequence of the value. Different implementations may produce different encoded digest and signature values when processing the same resources because of variances in their encoding, such as accidental white space. But if one uses numeric or octet comparison (choose one) on both the stated and computed values these problems are eliminated.</p> <section id="sec-ReferenceValidation"> <h4><span class="secno">3.2.1 </span>Reference Validation</h4> <ol> <li>Canonicalize the <code>SignedInfo</code> element based on the <code> CanonicalizationMethod</code> in <code>SignedInfo</code>.</li> <li>For each <code>Reference</code> in <code>SignedInfo</code>: <ol> <li>Obtain the data object to be digested. (For example, the signature application may dereference the <code>URI</code> and execute <code>Transforms</code> provided by the signer in the <code>Reference</code> element, or it may obtain the content through other means such as a local cache.)</li> <li>Digest the resulting data object using the <code>DigestMethod</code> specified in its <code>Reference</code> specification.</li> <li>Compare the generated digest value against <code>DigestValue</code> in the <code>SignedInfo</code> <code>Reference</code>; if there is any mismatch, validation fails.</li> </ol> </li> </ol> <p>Note, <code>SignedInfo</code> is canonicalized in step 1. The application must ensure that the <code>CanonicalizationMethod</code> has no dangerous side effects, such as rewriting URIs, (see <a href="#sec-CanonicalizationMethod-NOTE">note on Canonicalization Method</a> ) and that it <a href="#sec-See"> Sees What is Signed</a>, which is the canonical form.</p> <p>Note, After a <code>Signature</code> element has been created in Signature Generation for a signature with a same document reference, an implementation can serialize the XML content with variations in that serialization. This means that Reference Validation needs to canonicalize the XML document before digesting in step 1 to avoid issues related to variations in serialization. </p> </section> <section id="sec-SignatureValidation"> <h4><span class="secno">3.2.2 </span>Signature Validation</h4> <ol> <li>Obtain the keying information from <code><a href="#sec-KeyInfo">KeyInfo</a></code> or from an external source.</li> <li>Obtain the canonical form of the <code>SignatureMethod</code> using the <code>CanonicalizationMethod</code> and use the&nbsp;result (and previously obtained <code>KeyInfo</code>) to confirm the <code>SignatureValue</code> over the <code>SignedInfo</code> element.</li> </ol> <p>Note, <code><a href="#sec-KeyInfo">KeyInfo</a></code> (or some transformed version thereof) may be signed via a <code>Reference</code> element. Transformation and validation of this reference (3.2.1) is orthogonal to Signature Validation which uses the <code>KeyInfo</code> as parsed.</p> <p>Additionally, the <code>SignatureMethod</code> URI may have been altered by the canonicalization of <code>SignedInfo</code> (e.g., absolutization of relative URIs) and it is the canonical form that <em class="rfc2119" title="MUST">MUST</em> be used. However, the required canonicalization [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] of this specification does not change URIs.</p> </section> </section> </section> <section id="sec-CoreSyntax"> <!--OddPage--><h2><span class="secno">4. </span>Core Signature Syntax</h2> <p>The general structure of an XML signature is described in <a href="#sec-Overview" class="sectionRef sec-ref">section 2. Signature Overview and Examples</a>. This section provides detailed syntax of the core signature features. Features described in this section are mandatory to implement unless otherwise indicated. The syntax is defined via an [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>][<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>] with the following XML preamble, declaration, and internal entity.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"utf-8"</span><span class="pun">?&gt;</span><span class="pln"> </span><span class="dec">&lt;!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" [ &lt;!ATTLIST schema xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#"&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY % p ''&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY % s ''&gt;</span><span class="pln"> ]&gt; </span><span class="tag">&lt;schema</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2001/XMLSchema"</span><span class="pln"> </span><span class="atn">xmlns:ds</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="pln"> </span><span class="atn">targetNamespace</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="pln"> </span><span class="atn">version</span><span class="pun">=</span><span class="atv">"0.1"</span><span class="pln"> </span><span class="atn">elementFormDefault</span><span class="pun">=</span><span class="atv">"qualified"</span><span class="tag">&gt;</span></pre></div> <p>Additional markup defined in version 1.1 of this specification uses the <code>dsig11:</code> namespace. The syntax is defined in an XML schema with the following preamble:</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"utf-8"</span><span class="pun">?&gt;</span><span class="pln"> </span><span class="dec">&lt;!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" [ &lt;!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY dsig11 'http://www.w3.org/2009/xmldsig11#'&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY % p ''&gt;</span><span class="pln"> </span><span class="dec">&lt;!ENTITY % s ''&gt;</span><span class="pln"> ]&gt; </span><span class="tag">&lt;schema</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2001/XMLSchema"</span><span class="pln"> </span><span class="atn">xmlns:ds</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="pln"> </span><span class="atn">xmlns:dsig11</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2009/xmldsig11#"</span><span class="pln"> </span><span class="atn">targetNamespace</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2009/xmldsig11#"</span><span class="pln"> </span><span class="atn">version</span><span class="pun">=</span><span class="atv">"0.1"</span><span class="pln"> </span><span class="atn">elementFormDefault</span><span class="pun">=</span><span class="atv">"qualified"</span><span class="tag">&gt;</span></pre></div> <section id="sec-CryptoBinary"> <h3><span class="secno">4.1 </span>The <code>ds:CryptoBinary</code> Simple Type</h3> <p>This specification defines the <code>ds:CryptoBinary</code> simple type for representing arbitrary-length integers (e.g. "bignums") in XML as octet strings. The integer value is first converted to a "big endian" bitstring. The bitstring is then padded with leading zero bits so that the total number of bits == 0 mod 8 (so that there are an integral number of octets). If the bitstring contains entire leading octets that are zero, these are removed (so the high-order octet is always non-zero). This octet string is then base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>] encoded. (The conversion from integer to octet string is equivalent to IEEE 1363's I2OSP [<cite><a class="bibref" href="#bib-IEEE1363">IEEE1363</a></cite>] with minimal length).</p> <p>This type is used by "bignum" values such as <code>RSAKeyValue</code> and <code>DSAKeyValue</code>. If a value can be of type <code>base64Binary</code> or <code>ds:CryptoBinary</code> they are defined as <a href="https://www.w3.org/TR/xmlschema-2/#base64Binary"><code>base64Binary</code></a>. For example, if the signature algorithm is RSA or DSA then <code>SignatureValue</code> represents a bignum and could be <code>ds:CryptoBinary</code>. However, if HMAC-SHA1 is the signature algorithm then <code>SignatureValue</code> could have leading zero octets that must be preserved. Thus <code>SignatureValue</code> is generically defined as of type <code>base64Binary</code>.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;simpleType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CryptoBinary"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;restriction</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleType&gt;</span></pre></div> </section> <section id="sec-Signature"> <h3><span class="secno">4.2 </span>The <code>Signature</code> element</h3> <p>The <code>Signature</code> element is the root element of an XML Signature. Implementation <em class="rfc2119" title="MUST">MUST</em> generate <a href="https://www.w3.org/TR/2000/WD-xmlschema-1-20000407/#cvc-elt-lax">laxly schema valid</a> [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>][<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>] <code>Signature</code> elements as specified by the following schema:</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Signature"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignatureType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:SignedInfo"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:SignatureValue"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:KeyInfo"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Object"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> </section> <section id="sec-SignatureValue"> <h3><span class="secno">4.3 </span>The <code>SignatureValue</code> Element</h3> <p>The <code>SignatureValue</code> element contains the actual value of the digital signature; it is always encoded using base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>]. </p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignatureValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;extension</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/extension&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-SignedInfo"> <h3><span class="secno">4.4 </span>The <code>SignedInfo</code> Element</h3> <p>The structure of <code>SignedInfo</code> includes the canonicalization algorithm, a signature algorithm, and one or more references. The <code> SignedInfo</code> element may contain an optional ID attribute that will allow it to be referenced by other signatures and objects.</p> <p><code>SignedInfo</code> does not include explicit signature or digest properties (such as calculation time, cryptographic device serial number, etc.). If an application needs to associate properties with the signature or digest, it may include such information in a <code>SignatureProperties</code> element within an <code>Object</code> element.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignedInfo"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignedInfoType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignedInfoType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:CanonicalizationMethod"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:SignatureMethod"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Reference"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> <section id="sec-CanonicalizationMethod"> <h4><span class="secno">4.4.1 </span>The <code>CanonicalizationMethod</code> Element</h4> <p><code>CanonicalizationMethod</code> is a required element that specifies the canonicalization algorithm applied to the <code>SignedInfo</code> element prior to performing signature calculations. This element uses the general structure for algorithms described in <a href="#sec-AlgID" class="sectionRef sec-ref">section 6.1 Algorithm Identifiers and Implementation Requirements</a>. Implementations <em class="rfc2119" title="MUST">MUST</em> support the <em class="rfc2119" title="REQUIRED">REQUIRED</em> <a href="#sec-c14nAlg">canonicalization algorithms</a>.</p> <p>Alternatives to the <em class="rfc2119" title="REQUIRED">REQUIRED</em> <a href="#sec-c14nAlg">canonicalization algorithms</a> (section 6.5), such as <a href="#sec-Canonical">Canonical XML with Comments</a> (section 6.5.1) or a minimal canonicalization (such as CRLF and charset normalization) , may be explicitly specified but are <em class="rfc2119" title="NOT REQUIRED">NOT REQUIRED</em>. Consequently, their use may not interoperate with other applications that do not support the specified algorithm (see <a href="#sec-XML-Canonicalization">XML Canonicalization and Syntax Constraint Considerations</a>, section 7). Security issues may also arise in the treatment of entity processing and comments if non-XML aware canonicalization algorithms are not properly constrained (see section 8.1.2: <a href="#sec-Seen">Only What is "Seen" Should be Signed</a>).</p> <p>The way in which the <code>SignedInfo</code> element is presented to the canonicalization method is dependent on that method. The following applies to algorithms which process XML as nodes or characters:</p> <ul> <li>XML based canonicalization implementations <em class="rfc2119" title="MUST">MUST</em> be provided with an [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] node-set originally formed from the document containing the <code>SignedInfo</code> and currently indicating the <code>SignedInfo</code>, its descendants, and the attribute and namespace nodes of <code>SignedInfo</code> and its descendant elements.</li> <li>Text based canonicalization algorithms (such as CRLF and charset normalization) should be provided with the UTF-8 octets that represent the well-formed <code>SignedInfo</code> element, from the first character to the last character of the XML representation, inclusive. This includes the entire text of the start and end tags of the <code>SignedInfo</code> element as well as all descendant <a href="https://www.w3.org/TR/1998/REC-xml-19980210#syntax">markup and character data</a> (i.e., the <a href="https://www.w3.org/TR/1998/REC-xml-19980210#dt-text">text</a>) between those tags. Use of text based canonicalization of <code>SignedInfo</code> is <em class="rfc2119" title="NOT RECOMMENDED">NOT RECOMMENDED</em>.</li> </ul> <p>We recommend applications that implement a text-based instead of XML-based canonicalization -- such as resource constrained apps -- generate canonicalized XML as their output serialization so as to mitigate interoperability and security concerns. For instance, such an implementation <em class="rfc2119" title="SHOULD">SHOULD</em> (at least) generate <a href="https://www.w3.org/TR/REC-xml/#sec-rmd">standalone</a> XML instances [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>].</p> <p><strong><a id="sec-CanonicalizationMethod-NOTE">Note</a>:</strong> The signature application must exercise great care in accepting and executing an arbitrary <code> CanonicalizationMethod</code>. For example, the canonicalization method could rewrite the URIs of the <code>Reference</code>s being validated. Or, the method could massively transform <code>SignedInfo</code> so that validation would always succeed (i.e., converting it to a trivial signature with a known key over trivial data). Since <code>CanonicalizationMethod</code> is inside <code>SignedInfo</code>, in the resulting canonical form it could erase itself from <code>SignedInfo</code> or modify the <code>SignedInfo</code> element so that it appears that a different canonicalization function was used! Thus a <code>Signature</code> which appears to authenticate the desired data with the desired key, <code>DigestMethod</code>, and <code>SignatureMethod</code>, can be meaningless if a capricious <code>CanonicalizationMethod</code> is used.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CanonicalizationMethod"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CanonicalizationMethodType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CanonicalizationMethodType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##any"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- (0,unbounded) elements from (1,1) namespace --&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Algorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> </section> <section id="sec-SignatureMethod"> <h4><span class="secno">4.4.2 </span>The <code>SignatureMethod</code> Element</h4> <p><code>SignatureMethod</code> is a required element that specifies the algorithm used for signature generation and validation. This algorithm identifies all cryptographic functions involved in the signature operation (e.g. hashing, public key algorithms, MACs, padding, etc.). This element uses the general structure here for algorithms described in <a href="#sec-AlgID" class="sectionRef sec-ref">section 6.1 Algorithm Identifiers and Implementation Requirements</a>. While there is a single identifier, that identifier may specify a format containing multiple distinct signature values.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureMethod"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignatureMethodType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureMethodType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"HMACOutputLength"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:HMACOutputLengthType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- (0,unbounded) elements from (1,1) external namespace --&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Algorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> <p>The <code>ds:HMACOutputLength</code> parameter is used for HMAC [<cite><a class="bibref" href="#bib-HMAC">HMAC</a></cite>] algorithms. The parameter specifies a truncation length in bits. If this parameter is trusted without further verification, then this can lead to a security bypass [<cite><a class="bibref" href="#bib-CVE-2009-0217">CVE-2009-0217</a></cite>]. Signatures <em class="rfc2119" title="MUST">MUST</em> be deemed invalid if the truncation length is below the larger of (a) half the underlying hash algorithm's output length, and (b) 80 bits. Note that some implementations are known to not accept truncation lengths that are lower than the underlying hash algorithm's output length.</p> </section> <section id="sec-Reference"> <h4><span class="secno">4.4.3 </span>The <code>Reference</code> Element</h4> <p><code>Reference</code> is an element that may occur one or more times. It specifies a digest algorithm and digest value, and optionally an identifier of the object being signed, the type of the object, and/or a list of transforms to be applied prior to digesting. The identification (URI) and transforms describe how the digested content (i.e., the input to the digest method) was created. The <code>Type</code> attribute facilitates the processing of referenced data. For example, while this specification makes no requirements over external data, an application may wish to signal that the referent is a <code>Manifest</code>. An optional ID attribute permits a <code>Reference</code> to be referenced from elsewhere.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Reference"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:ReferenceType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ReferenceType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Transforms"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:DigestMethod"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:DigestValue"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"URI"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Type"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> <section id="sec-URI"> <h5><span class="secno">4.4.3.1 </span>The <code>URI</code> Attribute</h5> <p>The <code>URI</code> attribute identifies a data object using a URI-Reference [<cite><a class="bibref" href="#bib-URI">URI</a></cite>].</p> <p>The mapping from this attribute's value to a URI reference <em class="rfc2119" title="MUST">MUST</em> be performed as specified in section 3.2.17 of [<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. Additionally: Some existing implementations are known to verify the value of the <code>URI</code> attribute against the grammar in [<cite><a class="bibref" href="#bib-URI">URI</a></cite>]. It is therefore safest to perform any necessary escaping while generating the <code>URI</code> attribute.</p> <p>We RECOMMEND XML Signature applications be able to dereference URIs in the HTTP scheme. Dereferencing a URI in the HTTP scheme <em class="rfc2119" title="MUST">MUST</em> comply with the <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4">Status Code Definitions</a> of [<cite><a class="bibref" href="#bib-HTTP11">HTTP11</a></cite>] (e.g., 302, 305 and 307 redirects are followed to obtain the entity-body of a 200 status code response). Applications should also be cognizant of the fact that protocol parameter and state information, (such as HTTP cookies, HTML device profiles or content negotiation), may affect the content yielded by dereferencing a URI.</p> <p>If a resource is identified by more than one URI, the most specific should be used (e.g. http://www.w3.org/2000/06/interop-pressrelease.html.en instead of http://www.w3.org/2000/06/interop-pressrelease). (See <a href="#sec-CoreValidation" class="sectionRef sec-ref">section 3.2 Core Validation</a> for further information on reference processing.)</p> <p>If the <code>URI</code> attribute is omitted altogether, the receiving application is expected to know the identity of the object. For example, a lightweight data protocol might omit this attribute given the identity of the object is part of the application context. This attribute may be omitted from at most one <code>Reference</code> in any particular <code>SignedInfo</code>, or <code>Manifest</code>.</p> <p>The optional Type attribute contains information about the type of object being signed after all <code>ds:Reference</code> transforms have been applied. This is represented as a URI. For example:</p> <p><code>Type=<a href="https://www.w3.org/2000/09/xmldsig#Object">"http://www.w3.org/2000/09/xmldsig#Object"</a><br> Type=<a href="https://www.w3.org/2000/09/xmldsig#Manifest">"http://www.w3.org/2000/09/xmldsig#Manifest"</a></code></p> <p>The <code>Type</code> attribute applies to the item being pointed at, not its contents. For example, a reference that results in the digesting of an <code>Object</code> element containing a <code>SignatureProperties</code> element is still of type <code>#Object</code>. The <code>Type</code> attribute is advisory. No validation of the type information is required by this specification.</p> </section> <section id="sec-ReferenceProcessingModel"> <h5><span class="secno">4.4.3.2 </span>The Reference Processing Model</h5> <p class="comment"><strong><a id="Note-Xpath">Note</a>:</strong> XPath is <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em>. Signature applications need not conform to [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] specification in order to conform to this specification. However, the XPath data model, definitions (e.g., <a href="https://www.w3.org/TR/xpath#node-sets">node-sets</a>) and syntax is used within this document in order to describe functionality for those that want to process XML-as-XML (instead of octets) as part of signature generation. For those that want to use these features, a conformant [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] implementation is one way to implement these features, but it is not required. Such applications could use a sufficiently functional replacement to a node-set and implement only those XPath expression behaviors <em class="rfc2119" title="REQUIRED">REQUIRED</em> by this specification. However, for simplicity we generally will use XPath terminology without including this qualification on every point. Requirements over "XPath node-sets" can include a node-set functional equivalent. Requirements over XPath processing can include application behaviors that are equivalent to the corresponding XPath behavior.</p> <p>The data-type of the result of URI dereferencing or subsequent Transforms is either an octet stream or an XPath node-set.</p> <p>The <code>Transforms</code> specified in this document are defined with respect to the input they require. The following is the default signature application behavior:</p> <ul> <li>If the data object is an octet stream and the next transform requires a node-set, the signature application <em class="rfc2119" title="MUST">MUST</em> attempt to parse the octets yielding the required node-set via [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>] well-formed processing.</li> <li>If the data object is a node-set and the next transform requires octets, the signature application <em class="rfc2119" title="MUST">MUST</em> attempt to convert the node-set to an octet stream using Canonical XML [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>].</li> </ul> <p>Users may specify alternative transforms that override these defaults in transitions between transforms that expect different inputs. The final octet stream contains the data octets being secured. The digest algorithm specified by <code>DigestMethod</code> is then applied to these data octets, resulting in the <code>DigestValue</code>.</p> <p><strong>Note:</strong> The <a href="#sec-ReferenceGeneration" class="sectionRef sec-ref">section 3.1.1 Reference Generation</a> includes further restrictions on the reliance upon defined default transformations when applications generate signatures.</p> <p>In this specification, a 'same-document' reference is defined as a URI-Reference that consists of a hash sign ('#') followed by a fragment or alternatively consists of an empty URI [<cite><a class="bibref" href="#bib-URI">URI</a></cite>].</p> <p>Unless the URI-Reference is such a 'same-document' reference , the result of dereferencing the URI-Reference <em class="rfc2119" title="MUST">MUST</em> be an octet stream. In particular, an XML document identified by URI is not parsed by the signature application unless the URI is a same-document reference or unless a transform that requires XML parsing is applied. (See <a href="#sec-Transforms">Transforms</a> (section 4.4.3.4).)</p> <p>When a fragment is preceded by an absolute or relative URI in the URI-Reference, the meaning of the fragment is defined by the resource's MIME type [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>]. Even for XML documents, URI dereferencing (including the fragment processing) might be done for the signature application by a proxy. Therefore, reference validation might fail if fragment processing is not performed in a standard way (as defined in the following section for same-document references). Consequently, we RECOMMEND in this case that the <code>URI</code>&nbsp; attribute not include fragment identifiers and that such processing be specified as an additional <a href="#sec-XPath">XPath Transform</a> or XPath Filter 2 Transform [<cite><a class="bibref" href="#bib-XMLDSIG-XPATH-FILTER2">XMLDSIG-XPATH-FILTER2</a></cite>].</p> <p>When a fragment is not preceded by a URI in the URI-Reference, XML Signature applications <em class="rfc2119" title="MUST">MUST</em> support the null URI and shortname XPointer [<cite><a class="bibref" href="#bib-XPTR-FRAMEWORK">XPTR-FRAMEWORK</a></cite>]. We RECOMMEND support for the same-document XPointers '<code>#xpointer(/)</code>' and '<code>#xpointer(id('ID'))</code>' if the application also intends to support any <a href="#sec-Canonical">canonicalization</a> that preserves comments. (Otherwise <code>URI="#foo"</code> will automatically remove comments before the canonicalization can even be invoked due to the processing defined in <a href="#sec-Same-Document">Same-Document URI-References</a> (section 4.4.3.3).) All other support for XPointers is <em class="rfc2119" title="OPTIONAL">OPTIONAL</em>, especially all support for shortname and other XPointers in external resources since the application may not have control over how the fragment is generated (leading to interoperability problems and validation failures).</p> <p>'<code>#xpointer(/)</code>' <em class="rfc2119" title="MUST">MUST</em> be interpreted to identify the root node [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] of the document that contains the <code>URI</code> attribute.</p> <p>'<code>#xpointer(id('<em>ID</em>'))</code>' <em class="rfc2119" title="MUST">MUST</em> be interpreted to identify the element node identified by '<code>#element(<em>ID</em>)</code>' [<cite><a class="bibref" href="#bib-XPTR-ELEMENT">XPTR-ELEMENT</a></cite>] when evaluated with respect to the document that contains the <code>URI</code> attribute.</p> <p>The original edition of this specification [<cite><a class="bibref" href="#bib-XMLDSIG-CORE">XMLDSIG-CORE</a></cite>] referenced the XPointer Candidate Recommendation [<cite><a class="bibref" href="#bib-XPTR-XPOINTER-CR2001">XPTR-XPOINTER-CR2001</a></cite>] and some implementations support it optionally. That Candidate Recommendation has been superseded by the [<cite><a class="bibref" href="#bib-XPTR-FRAMEWORK">XPTR-FRAMEWORK</a></cite>], [<cite><a class="bibref" href="#bib-XPTR-XMLNS">XPTR-XMLNS</a></cite>] and [<cite><a class="bibref" href="#bib-XPTR-ELEMENT">XPTR-ELEMENT</a></cite>] Recommendations, and -- at the time of this edition -- the [<cite><a class="bibref" href="#bib-XPTR-XPOINTER">XPTR-XPOINTER</a></cite>] Working Draft. Therefore, the use of the <code> xpointer()</code> scheme [<cite><a class="bibref" href="#bib-XPTR-XPOINTER">XPTR-XPOINTER</a></cite>] beyond the usage discussed in this section is discouraged.</p> <p>The following examples demonstrate what the URI attribute identifies and how it is dereferenced:</p> <dl> <dt><code>URI="http://example.com/bar.xml"</code></dt> <dd>Identifies the octets that represent the external resource 'http://example.com/bar.xml', that is probably an XML document given its file extension.</dd> <dt><code>URI="http://example.com/bar.xml#chapter1"</code></dt> <dd>Identifies the element with ID attribute value 'chapter1' of the external XML resource 'http://example.com/bar.xml', provided as an octet stream. Again, for the sake of interoperability, the element identified as 'chapter1' should be obtained using an XPath transform rather than a URI fragment (shortname XPointer resolution in external resources is not <em class="rfc2119" title="REQUIRED">REQUIRED</em> in this specification).</dd> <dt><code>URI=""</code></dt> <dd>Identifies the node-set (minus any comment nodes) of the XML resource containing the signature</dd> <dt><code>URI="#chapter1"</code></dt> <dd>Identifies a node-set containing the element with ID attribute value 'chapter1' of the XML resource containing the signature. XML Signature (and its applications) modify this node-set to include the element plus all descendants including namespaces and attributes -- but not comments.</dd> </dl> </section> <section id="sec-Same-Document"> <h5><span class="secno">4.4.3.3 </span>Same-Document URI-References</h5> <p>Dereferencing a same-document reference <em class="rfc2119" title="MUST">MUST</em> result in an XPath node-set suitable for use by Canonical XML [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>]. Specifically, dereferencing a null URI (<code>URI=""</code>) <em class="rfc2119" title="MUST">MUST</em> result in an XPath node-set that includes every non-comment node of the XML document containing the <code>URI</code> attribute. In a fragment URI, the characters after the number sign ('#') character conform to the XPointer syntax [<cite><a class="bibref" href="#bib-XPTR-FRAMEWORK">XPTR-FRAMEWORK</a></cite>]. When processing an XPointer, the application <em class="rfc2119" title="MUST">MUST</em> behave as if the XPointer was evaluated with respect to the XML document containing the <code>URI</code> attribute . The application <em class="rfc2119" title="MUST">MUST</em> behave as if the result of XPointer processing [<cite><a class="bibref" href="#bib-XPTR-FRAMEWORK">XPTR-FRAMEWORK</a></cite>] were a node-set derived from the resultant subresource as follows:</p> <ol> <li>include XPath nodes having full or partial content within the subresource</li> <li>replace the root node with its children (if it is in the node-set)</li> <li>replace any element node <strong>E</strong> with <strong>E</strong> plus all descendants of <strong>E</strong> (text, comment, PI, element) and all namespace and attribute nodes of <strong> E</strong> and its descendant elements.</li> <li>if the URI has no fragment identifier or the fragment identifier is a shortname XPointer, then delete all comment nodes</li> </ol> <p>The second to last replacement is necessary because XPointer typically indicates a subtree of an XML document's parse tree using just the element node at the root of the subtree, whereas Canonical XML treats a node-set as a set of nodes in which absence of descendant nodes results in absence of their representative text from the canonical form.</p> <p>The last step is performed for null URIs and shortname XPointers . It is necessary because when [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] or [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>] is passed a node-set, it processes the node-set as is: with or without comments. Only when it is called with an octet stream does it invoke its own XPath expressions (default or without comments). Therefore to retain the default behavior of stripping comments when passed a node-set, they are removed in the last step if the URI is not a scheme-based XPointer. To retain comments while selecting an element by an identifier <em>ID</em>, use the following scheme-based XPointer: <code>URI='#xpointer(id('<em>ID</em>'))'</code>. To retain comments while selecting the entire document, use the following scheme-based XPointer: <code> URI='#xpointer(/)'</code>.</p> <p>The interpretation of these XPointers is defined in <a href="#sec-ReferenceProcessingModel">The Reference Processing Model</a> (section 4.4.3.2).</p> </section> <section id="sec-Transforms"> <h5><span class="secno">4.4.3.4 </span>The <code>Transforms</code> Element</h5> <p>The optional <code>Transforms</code> element contains an ordered list of <code> Transform</code> elements; these describe how the signer obtained the data object that was digested. The output of each <code>Transform</code> serves as input to the next <code>Transform</code>. The input to the first <code>Transform</code> is the result of dereferencing the <code>URI</code> attribute of the <code>Reference</code> element. The output from the last <code>Transform</code> is the input for the <code>DigestMethod</code> algorithm. When transforms are applied the signer is not signing the native (original) document but the resulting (transformed) document. (See <a href="#sec-Secure">Only What is Signed is Secure</a> (section 8.1.1).)</p> <p>Each <code>Transform</code> consists of an <code>Algorithm</code> attribute and content parameters, if any, appropriate for the given algorithm. The <code>Algorithm</code> attribute value specifies the name of the algorithm to be performed, and the <code> Transform</code> content provides additional data to govern the algorithm's processing of the transform input. (See <a href="#sec-AlgID" class="sectionRef sec-ref">section 6.1 Algorithm Identifiers and Implementation Requirements</a>)</p> <p>As described in <a href="#sec-ReferenceProcessingModel">The Reference Processing Model</a> (section&nbsp; 4.4.3.2), some transforms take an XPath node-set as input, while others require an octet stream. If the actual input matches the input needs of the transform, then the transform operates on the unaltered input. If the transform input requirement differs from the format of the actual input, then the input must be converted.</p> <p>Some <code>Transform</code>s may require explicit MIME type, charset (IANA registered "character set"), or other such information concerning the data they are receiving from an earlier <code>Transform</code> or the source data, although no <code>Transform</code> algorithm specified in this document needs such explicit information. Such data characteristics are provided as parameters to the <code>Transform</code> algorithm and should be described in the specification for the algorithm.</p> <p>Examples of transforms include but are not limited to base64 decoding [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>], canonicalization [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>], XPath filtering [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>], and XSLT [<cite><a class="bibref" href="#bib-XSLT">XSLT</a></cite>]. The generic definition of the <code>Transform</code> element also allows application-specific transform algorithms. For example, the transform could be a decompression routine given by a Java class appearing as a base64 encoded parameter to a Java <code> Transform</code> algorithm. However, applications should refrain from using application-specific transforms if they wish their signatures to be verifiable outside of their application domain. <a href="#sec-TransformAlg">Transform Algorithms</a> (section 6.6) defines the list of standard transformations.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Transforms"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:TransformsType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TransformsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Transform"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Transform"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:TransformType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TransformType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- (1,1) elements from (0,unbounded) namespaces --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"XPath"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Algorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-DigestMethod"> <h5><span class="secno">4.4.3.5 </span>The <code>DigestMethod</code> Element</h5> <p><code>DigestMethod</code> is a required element that identifies the digest algorithm to be applied to the signed object. This element uses the general structure here for algorithms specified in <a href="#sec-AlgID" class="sectionRef sec-ref">section 6.1 Algorithm Identifiers and Implementation Requirements</a>.</p> <p>If the result of the URI dereference and application of Transforms is an XPath node-set (or sufficiently functional replacement implemented by the application) then it must be converted as described in <a href="#sec-ReferenceProcessingModel" class="sectionRef sec-ref">section 4.4.3.2 The Reference Processing Model</a>. If the result of URI dereference and application of transforms is an octet stream, then no conversion occurs (comments might be present if the Canonical XML with Comments was specified in the Transforms). The digest algorithm is applied to the data octets of the resulting octet stream.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DigestMethod"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:DigestMethodType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DigestMethodType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Algorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> </section> <section id="sec-DigestValue"> <h5><span class="secno">4.4.3.6 </span>The <code>DigestValue</code> Element</h5> <p>DigestValue is an element that contains the encoded value of the digest. The digest is always encoded using base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>].</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DigestValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:DigestValueType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;simpleType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DigestValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;restriction</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleType&gt;</span><span class="pln"> </span></pre></div> </section> </section> </section> <section id="sec-KeyInfo"> <h3><span class="secno">4.5 </span>The <code>KeyInfo</code> Element</h3> <p><code>KeyInfo</code> is an optional element that enables the recipient(s) to obtain the key needed to validate the signature.&nbsp; <code>KeyInfo</code> may contain keys, names, certificates and other public key management information, such as in-band key distribution or key agreement data. This specification defines a few simple types but applications may extend those types or all together replace them with their own key identification and exchange semantics using the XML namespace facility [<cite><a class="bibref" href="#bib-XML-NAMES">XML-NAMES</a></cite>]. However, questions of trust of such key information (e.g., its authenticity or&nbsp; strength) are out of scope of this specification and left to the application. Details of the structure and usage of element children of <code>KeyInfo</code> other than simple types described in this specification are out of scope. For example, the definition of PKI certificate contents, certificate ordering, certificate revocation and CRL management are out of scope. </p> <p>If <code>KeyInfo</code> is omitted, the recipient is expected to be able to identify the key based on application context. Multiple declarations within <code> KeyInfo</code> refer to the same key. While applications may define and use any mechanism they choose through inclusion of elements from a different namespace, compliant versions <em class="rfc2119" title="MUST">MUST</em> implement <code>KeyValue</code> (<a href="#sec-KeyValue" class="sectionRef sec-ref">section 4.5.2 The KeyValue Element</a>) and <em class="rfc2119" title="SHOULD">SHOULD</em> implement <code>KeyInfoReference</code> (<a href="#sec-KeyInfoReference" class="sectionRef sec-ref">section 4.5.10 The KeyInfoReference Element</a>). <code>KeyInfoReference</code> is preferred over use of <code>RetrievalMethod</code> as it avoids use of <code>Transform</code> child elements that introduce security risk and implementation challenges. Support for other children of <code>KeyInfo</code> is <em class="rfc2119" title="OPTIONAL">OPTIONAL</em>. </p> <p>The schema specification of many of <code>KeyInfo</code>'s children (e.g., <code>PGPData</code>, <code>SPKIData</code>, <code>X509Data</code>) permit their content to be extended/complemented with elements from another namespace. This may be done only if it is safe to ignore these extension elements while claiming support for the types defined in this specification. Otherwise, external elements, including <em>alternative</em> structures to those defined by this specification, <em class="rfc2119" title="MUST">MUST</em> be a child of <code>KeyInfo</code>. For example, should a complete XML-PGP standard be defined, its root element <em class="rfc2119" title="MUST">MUST</em> be a child of <code>KeyInfo</code>. (Of course, new structures from external namespaces can incorporate elements from the <code>dsig:</code> namespace via features of the type definition language. For instance, they can create a schema that permits, includes, imports, or derives new types based on <code>dsig:</code> elements.)</p> <p>The following list summarizes the <code>KeyInfo</code> types that are allocated an identifier in the <code>dsig:</code> namespace; these can be used within the <code>RetrievalMethod</code> <code>Type</code> attribute to describe a remote <code> KeyInfo</code> structure.</p> <ul> <li><a href="https://www.w3.org/2000/09/xmldsig#DSAKeyValue">http://www.w3.org/2000/09/xmldsig#DSAKeyValue</a></li> <li><a href="https://www.w3.org/2000/09/xmldsig#RSAKeyValue">http://www.w3.org/2000/09/xmldsig#RSAKeyValue</a></li> <li><a href="https://www.w3.org/2000/09/xmldsig#X509Data">http://www.w3.org/2000/09/xmldsig#X509Data</a></li> <li><a href="https://www.w3.org/2000/09/xmldsig#PGPData">http://www.w3.org/2000/09/xmldsig#PGPData</a></li> <li><a href="https://www.w3.org/2000/09/xmldsig#SPKIData">http://www.w3.org/2000/09/xmldsig#SPKIData</a></li> <li><a href="https://www.w3.org/2000/09/xmldsig#MgmtData">http://www.w3.org/2000/09/xmldsig#MgmtData</a></li> </ul> <p>The following list summarizes the additional <code>KeyInfo</code> types that are allocated an identifier in the <code>dsig11:</code> namespace.</p> <ul> <li><a href="https://www.w3.org/2009/xmldsig11#ECKeyValue">http://www.w3.org/2009/xmldsig11#ECKeyValue</a></li> <li><a href="https://www.w3.org/2009/xmldsig11#DEREncodedKeyValue">http://www.w3.org/2009/xmldsig11#DEREncodedKeyValue</a></li> </ul> <p>In addition to the types above for which we define an XML structure, we specify one additional type to indicate a <a id="rawX509Certificate">binary (ASN.1 DER) X.509 Certificate</a>.</p> <ul> <li><a href="https://www.w3.org/2000/09/xmldsig#rawX509Certificate">http://www.w3.org/2000/09/xmldsig#rawX509Certificate</a></li> </ul> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyInfo"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:KeyInfoType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyInfoType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:KeyName"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:KeyValue"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:RetrievalMethod"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:X509Data"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:PGPData"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:SPKIData"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:MgmtData"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="dsig11:DEREncodedKeyValue"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- DEREncodedKeyValue (XMLDsig 1.1) will use the any element --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="dsig11:KeyInfoReference"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- KeyInfoReference (XMLDsig 1.1) will use the any element --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="xenc:EncryptedKey"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- EncryptedKey (XMLEnc) will use the any element --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="xenc:Agreement"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- Agreement (XMLEnc) will use the any element --&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- (1,1) elements from (0,unbounded) namespaces --&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> <section id="sec-KeyName"> <h4><span class="secno">4.5.1 </span>The <code>KeyName</code> Element</h4> <p>The <code>KeyName</code> element contains a string value (in which white space is significant) which may be used by the signer to communicate a key identifier to the recipient. Typically, <code>KeyName</code> contains an identifier related to the key pair used to sign the message, but it may contain other protocol-related information that indirectly identifies a key pair. (Common uses of <code>KeyName</code> include simple string names for keys, a key index, a distinguished name (DN), an email address, etc.)</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyName"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-KeyValue"> <h4><span class="secno">4.5.2 </span>The <code>KeyValue</code> Element</h4> <p>The <code>KeyValue</code> element contains a single public key that may be useful in validating the signature. Structured formats for defining DSA (<em class="rfc2119" title="REQUIRED">REQUIRED</em>), RSA (<em class="rfc2119" title="REQUIRED">REQUIRED</em>) and ECDSA (<em class="rfc2119" title="REQUIRED">REQUIRED</em>) public keys are defined in <a href="#sec-SignatureAlg" class="sectionRef sec-ref">section 6.4 Signature Algorithms</a>. The <code>KeyValue</code> element may include externally defined public keys values represented as PCDATA or element types from an external namespace.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:KeyValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyValueType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:DSAKeyValue"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:RSAKeyValue"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="dsig11:ECKeyValue"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- ECC keys (XMLDsig 1.1) will use the any element --&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> <section id="sec-DSAKeyValue"> <h5><span class="secno">4.5.2.1 </span>The <code>DSAKeyValue</code> Element</h5> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="DSAKeyValue" href="https://www.w3.org/2000/09/xmldsig#DSAKeyValue">http://www.w3.org/2000/09/xmldsig#DSAKeyValue</a>"<br> </code> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>DSA keys and the DSA signature algorithm are specified in [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>]. DSA public key values can have the following fields:</p> <dl> <dt><code>P</code></dt> <dd>a prime modulus meeting the [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>] requirements</dd> <dt><code>Q</code></dt> <dd>an integer in the range 2**159 &lt; Q &lt; 2**160 which is a prime divisor of P-1</dd> <dt><code>G</code></dt> <dd>an integer with certain properties with respect to P and Q</dd> <dt><code>Y</code></dt> <dd>G**X mod P (where X is part of the private key and not made public)</dd> <dt><code>J</code></dt> <dd>(P - 1) / Q</dd> <dt><code>seed</code></dt> <dd>a DSA prime generation seed</dd> <dt><code>pgenCounter</code></dt> <dd>a DSA prime generation counter</dd> </dl> <p>Parameter <code>J</code> is available for inclusion solely for efficiency as it is calculatable from <code>P</code> and <code>Q</code>. Parameters <code>seed</code> and <code>pgenCounter</code> are used in the DSA prime number generation algorithm specified in [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>]. As such, they are optional but must either both be present or both be absent. This prime generation algorithm is designed to provide assurance that a weak prime is not being used and it yields a <code>P</code> and <code>Q</code> value. Parameters <code>P</code>, <code>Q</code>, and <code>G</code> can be public and common to a group of users. They might be known from application context. As such, they are optional but <code>P</code> and <code>Q</code> must either both appear or both be absent. If all of <code>P</code>, <code>Q</code>, <code>seed</code>, and <code>pgenCounter</code> are present, implementations are not required to check if they are consistent and are free to use either <code>P</code> and <code> Q</code> or <code>seed</code> and <code>pgenCounter</code>. All parameters are encoded as base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>] values.</p> <p>Arbitrary-length integers (e.g. "bignums" such as RSA moduli) are represented in XML as octet strings as defined by the <a href="#sec-CryptoBinary"><code>ds:CryptoBinary</code> type</a>.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DSAKeyValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:DSAKeyValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DSAKeyValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"P"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Q"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"G"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Y"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"J"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Seed"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PgenCounter"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-RSAKeyValue"> <h5><span class="secno">4.5.2.2 </span>The <code>RSAKeyValue</code> Element</h5> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="RSAKeyValue" href="https://www.w3.org/2000/09/xmldsig#RSAKeyValue">http://www.w3.org/2000/09/xmldsig#RSAKeyValue</a>"<br> </code> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>RSA key values have two fields: <code>Modulus</code> and <code>Exponent</code>.</p> <div><div class="example"><div class="example-title"><span>Example 6</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;RSAKeyValue&gt;</span><span class="pln"> </span><span class="tag">&lt;Modulus&gt;</span><span class="pln">xA7SEU+e0yQH5rm9kbCDN9o3aPIo7HbP7tX6WOocLZAtNfyxSZDU16ksL6W jubafOqNEpcwR3RdFsT7bCqnXPBe5ELh5u4VEy19MzxkXRgrMvavzyBpVRgBUwUlV 5foK5hhmbktQhyNdy/6LpQRhDUDsTvK+g9Ucj47es9AQJ3U= </span><span class="tag">&lt;/Modulus&gt;</span><span class="pln"> </span><span class="tag">&lt;Exponent&gt;</span><span class="pln">AQAB</span><span class="tag">&lt;/Exponent&gt;</span><span class="pln"> </span><span class="tag">&lt;/RSAKeyValue&gt;</span></pre></div></div> <p>Arbitrary-length integers (e.g. "bignums" such as RSA moduli) are represented in XML as octet strings as defined by the <a href="#sec-CryptoBinary"><code>ds:CryptoBinary</code> type</a>.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"RSAKeyValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:RSAKeyValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"RSAKeyValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Modulus"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Exponent"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-ECKeyValue"> <h5><span class="secno">4.5.2.3 </span>The <code>ECKeyValue</code> Element</h5> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="ECKeyValue" href="https://www.w3.org/2009/xmldsig11#ECKeyValue">http://www.w3.org/2009/xmldsig11#ECKeyValue</a>"<br></code>(this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>The <code>ECKeyValue</code> element is defined in the http://www.w3.org/2009/xmldsig11# namespace. </p> <p>EC public key values consists of two sub components: Domain parameters and <code>PublicKey</code>. </p> <div><div class="example"><div class="example-title"><span>Example 7</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;ECKeyValue</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2009/xmldsig11#"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;NamedCurve</span><span class="pln"> </span><span class="atn">URI</span><span class="pun">=</span><span class="atv">"urn:oid:1.2.840.10045.3.1.7"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;PublicKey&gt;</span><span class="pln"> vWccUP6Jp3pcaMCGIcAh3YOev4gaa2ukOANC7Ufg Cf8KDO7AtTOsGJK7/TA8IC3vZoCy9I5oPjRhyTBulBnj7Y </span><span class="tag">&lt;/PublicKey&gt;</span><span class="pln"> </span><span class="tag">&lt;/ECKeyValue&gt;</span></pre></div></div> <p>Note - A line break has been added to the <code>PublicKey</code> content to preserve printed page width.</p> <p>Domain parameters can be encoded explicitly using the <code>dsig11:ECParameters</code> element or by reference using the <code>dsig11:NamedCurve</code> element. A named curve is specified through the <code>URI</code> attribute. For named curves that are identified by OIDs, such as those defined in [<cite><a class="bibref" href="#bib-RFC3279">RFC3279</a></cite>] and [<cite><a class="bibref" href="#bib-RFC4055">RFC4055</a></cite>], the OID <em class="rfc2119" title="SHOULD">SHOULD</em> be encoded according to [<cite><a class="bibref" href="#bib-URN-OID">URN-OID</a></cite>]. Conformant applications <em class="rfc2119" title="MUST">MUST</em> support the <code>dsig11:NamedCurve</code> element and the 256-bit prime field curve as identified by the OID <code>1.2.840.10045.3.1.7</code>.</p> <p>The <code>PublicKey</code> element contains a Base64 encoding of a binary representation of the x and y coordinates of the point. Its value is computed as follows:</p> <ol> <li>Convert the elliptic curve point (x,y) to an octet string by first converting the field elements x and y to octet strings as specified in Section 6.2 of [<cite><a class="bibref" href="#bib-ECC-ALGS">ECC-ALGS</a></cite>] (<a href="#rfc6090note">note</a>), and then prepend the concatenated result of the conversion with 0x04. Support for Elliptic-Curve-Point-to-Octet-String conversion without point compression is <em class="rfc2119" title="REQUIRED">REQUIRED</em>. </li> <li>Base64 encode the octet string resulting from the conversion in Step 1.</li> </ol> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECKeyValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:ECKeyValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECKeyValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;choice&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECParameters"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:ECParametersType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"NamedCurve"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:NamedCurveType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PublicKey"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:ECPointType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"NamedCurveType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"URI"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;simpleType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECPointType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;restriction</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleType&gt;</span><span class="pln"> </span></pre></div> <section id="sec-ECParameters"> <h6><span class="secno">4.5.2.3.1 </span>Explicit Curve Parameters </h6> <p>The <code>ECParameters</code> element consists of the following subelements. Note these definitions are based on the those described in [<cite><a class="bibref" href="#bib-RFC3279">RFC3279</a></cite>].</p> <ol> <li>The <code>FieldID</code> element identifies the finite field over which the elliptic curve is defined. Additional details on the structures for defining prime and characteristic two fields is provided below.</li> <li>The <code>dsig11:Curve</code> element specifies the coefficients a and b of the elliptic curve E. Each coefficient is first converted from a field element to an octet string as specified in section 6.2 of [<cite><a class="bibref" href="#bib-ECC-ALGS">ECC-ALGS</a></cite>], then the resultant octet string is encoded in base64.</li> <li>The <code>Base</code> element specifies the base point P on the elliptic curve. The base point is represented as a value of type <code>ECPointType</code>.</li> <li>The <code>Order</code> element specifies the order n of the base point and is encoded as a positiveInteger.</li> <li>The <code>Cofactor</code> element is an optional element that specifies the integer h = #E(Fq)/n. The cofactor is not required to support ECDSA, except in parameter validation. The cofactor <em class="rfc2119" title="MAY">MAY</em> be included to support parameter validation for ECDSA keys. Parameter validation is not required by this specification. The cofactor is required in ECDH public key parameters.</li> <li>The <code>dsig11:ValidationData</code> element is an optional element that specifies the hash algorithm used to generate the elliptic curve E and the base point G verifiably at random. It also specifies the seed that was used to generate the curve and the base point. </li> </ol> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECParametersType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"FieldID"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:FieldIDType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Curve"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:CurveType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Base"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:ECPointType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Order"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CoFactor"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"integer"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ValidationData"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:ECValidationDataType"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"FieldIDType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"dsig11:Prime"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"dsig11:TnB"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"dsig11:PnB"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"dsig11:GnB"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CurveType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"A"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"B"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ECValidationDataType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"seed"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"hashAlgorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> <p>Prime fields are described by a single subelement <code>P</code>, which represents the field size in bits. It is encoded as a positiveInteger.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Prime"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:PrimeFieldParamsType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PrimeFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"P"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:CryptoBinary"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> <p>Structures are defined for three types of characteristic two fields: gaussian normal basis, pentanomial basis and trinomial basis. </p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"GnB"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:CharTwoFieldParamsType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"CharTwoFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"M"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"positiveInteger"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TnB"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:TnBFieldParamsType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"TnBFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;complexContent&gt;</span><span class="pln"> </span><span class="tag">&lt;extension</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"dsig11:CharTwoFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"K"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"positiveInteger"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/extension&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexContent&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PnB"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:PnBFieldParamsType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PnBFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;complexContent&gt;</span><span class="pln"> </span><span class="tag">&lt;extension</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"dsig11:CharTwoFieldParamsType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"K1"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"positiveInteger"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"K2"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"positiveInteger"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"K3"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"positiveInteger"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/extension&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexContent&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-RFC4050Compat"> <h6><span class="secno">4.5.2.3.2 </span>Compatibility with RFC 4050</h6> <p>Implementations that need to support the [<cite><a class="bibref" href="#bib-RFC4050">RFC4050</a></cite>] format for ECDSA keys can avoid known interoperability problems with that specification by adhering to the following profile:</p> <ol> <li>Avoid validating the <code>ECDSAKeyValue</code> element against the [<cite><a class="bibref" href="#bib-RFC4050">RFC4050</a></cite>] schema. XML schema validators may not support integer types with decimal data exceeding 18 decimal digits. [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>][<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>].</li> <li>Support only the <code>NamedCurve</code> element.</li> <li>Support the 256-bit prime field curve, as identified by the URN <code>urn:oid:1.2.840.10045.3.1.7</code>.</li> </ol> <p>The following is an example of a <code>ECDSAKeyValue</code> element that meets the profile described in this section.</p> <div><div class="example"><div class="example-title"><span>Example 8</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;ECDSAKeyValue</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2001/04/xmldsig-more#"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;DomainParameters&gt;</span><span class="pln"> </span><span class="tag">&lt;NamedCurve</span><span class="pln"> </span><span class="atn">URN</span><span class="pun">=</span><span class="atv">"urn:oid:1.2.840.10045.3.1.7"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/DomainParameters&gt;</span><span class="pln"> </span><span class="tag">&lt;PublicKey&gt;</span><span class="pln"> </span><span class="tag">&lt;X</span><span class="pln"> </span><span class="atn">Value</span><span class="pun">=</span><span class="atv">"5851106065380174439324917904648283332 0204931884267326155134056258624064349885"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;Y</span><span class="pln"> </span><span class="atn">Value</span><span class="pun">=</span><span class="atv">"1024033521368277752409102672177795083 59028642524881540878079119895764161434936"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/PublicKey&gt;</span><span class="pln"> </span><span class="tag">&lt;/ECDSAKeyValue&gt;</span></pre></div></div> <p>Note - A line break has been added to the <code>X</code> and <code>Y</code> <code>Value</code> attribute values to preserve printed page width.</p> </section> </section> </section> <section id="sec-RetrievalMethod"> <h4><span class="secno">4.5.3 </span>The <code>RetrievalMethod</code> Element</h4> <p>A <code>RetrievalMethod</code> element within <code>KeyInfo</code> is used to convey a reference to <code>KeyInfo</code> information that is stored at another location. For example, several signatures in a document might use a key verified by an X.509v3 certificate chain appearing once in the document or remotely outside the document; each signature's <code>KeyInfo</code> can reference this chain using a single <code>RetrievalMethod</code> element instead of including the entire chain with a sequence of <code>X509Certificate</code> elements.</p> <p><code>RetrievalMethod</code> uses the same syntax and dereferencing behavior as the <code>Reference</code> URI attribute (<a href="#sec-URI" class="sectionRef sec-ref">section 4.4.3.1 The URI Attribute</a>) and the <a href="#sec-ReferenceProcessingModel">Reference Processing Model</a> except that there are no <code>DigestMethod</code> or <code>DigestValue</code> child elements and presence of the <code>URI</code> attribute is mandatory.</p> <p><code>Type</code> is an optional identifier for the type of data retrieved after all transforms have been applied. The result of dereferencing a <code> RetrievalMethod</code> <code><a href="#sec-URI">Reference</a></code> for all <a href="#sec-KeyInfo"><code>KeyInfo</code> types defined by this specification</a> ( <a href="#sec-KeyInfo" class="sectionRef sec-ref">section 4.5 The KeyInfo Element</a>) with a corresponding XML structure is an XML element or document with that element as the root. The <code> rawX509Certificate</code> <code>KeyInfo</code> (for which there is no XML structure) returns a binary X509 certificate.</p> <p> Note that when referencing one of the defined <code>KeyInfo</code> types within the same document, or some remote documents, at least one <code>Transform</code> is required to turn an ID-based reference to a <code>KeyInfo</code> element into a child element located inside it. This is due to the lack of an XML ID attribute on the defined <code>KeyInfo</code> types. In such cases, use of <code>KeyInfoReference</code> is encouraged instead, see <a href="#sec-KeyInfoReference" class="sectionRef sec-ref">section 4.5.10 The KeyInfoReference Element</a>.</p> <p><strong>Note:</strong> The <code>KeyInfoReference</code> element is preferred over use of <code>RetrievalMethod</code> as it avoids use of <code>Transform</code> child elements that introduce security risk and implementation challenges.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"RetrievalMethod"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:RetrievalMethodType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"RetrievalMethodType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Transforms"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"URI"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Type"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> <p><strong>Note:</strong> The schema for the <code>URI</code> attribute of RetrievalMethod erroneously omitted the attribute: <code>use="required"</code>. However, this error only results in a more lax schema which permits all valid <code>RetrievalMethod</code> elements. Because the existing schema is embedded in many applications, which may include the schema in their signatures, the schema has not been corrected to be more restrictive.</p> </section> <section id="sec-X509Data"> <h4><span class="secno">4.5.4 </span>The <code>X509Data</code> Element</h4> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="X509Data" href="https://www.w3.org/2000/09/xmldsig#X509Data">http://www.w3.org/2000/09/xmldsig#X509Data</a></code> "<br> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>An <code>X509Data</code> element within <code>KeyInfo</code> contains one or more identifiers of keys or X509 certificates (or certificates' identifiers or a revocation list). The content of <code>X509Data</code> is at least one element, from the following set of element types; any of these may appear together or more than once iff (if and only if) each instance describes or is related to the same certificate:</p> <ul> <li>The deprecated <code>X509IssuerSerial</code> element, which contains an X.509 issuer distinguished name/serial number pair. The distinguished name <em class="rfc2119" title="SHOULD">SHOULD</em> be represented as a string that complies with section 3 of RFC4514 [<cite><a class="bibref" href="#bib-LDAP-DN">LDAP-DN</a></cite>], to be generated according to the <a href="#dname-encrules">Distinguished Name Encoding Rules</a> section below,</li> <li>The <code>X509SubjectName</code> element, which contains an X.509 subject distinguished name that <em class="rfc2119" title="SHOULD">SHOULD</em> be represented as a string that complies with section 3 of RFC4514 [<cite><a class="bibref" href="#bib-LDAP-DN">LDAP-DN</a></cite>], to be generated according to the <a href="#dname-encrules">Distinguished Name Encoding Rules</a> section below,</li> <li>The <code>X509SKI</code> element, which contains the base64 encoded plain (i.e. non-DER-encoded) value of a X509 V.3 SubjectKeyIdentifier extension,</li> <li>The <code>X509Certificate</code> element, which contains a base64-encoded [<cite><a class="bibref" href="#bib-X509V3">X509V3</a></cite>] certificate, and</li> <li>The <code>X509CRL</code> element, which contains a base64-encoded certificate revocation list (CRL) [<cite><a class="bibref" href="#bib-X509V3">X509V3</a></cite>].</li> <li>The <code>dsig11:X509Digest</code> element contains a base64-encoded digest of a certificate. The digest algorithm URI is identified with a required <code>Algorithm</code> attribute. The input to the digest <em class="rfc2119" title="MUST">MUST</em> be the raw octets that would be base64-encoded were the same certificate to appear in the X509Certificate element.</li> <li>Elements from an external namespace which accompanies/complements any of the elements above.</li> </ul> <p>Any <code>X509IssuerSerial</code>, <code>X509SKI</code>, <code>X509SubjectName</code>, and <code>dsig11:X509Digest</code> elements that appear <em class="rfc2119" title="MUST">MUST</em> refer to the certificate or certificates containing the validation key. All such elements that refer to a particular individual certificate <em class="rfc2119" title="MUST">MUST</em> be grouped inside a single <code>X509Data</code> element and if the certificate to which they refer appears, it <em class="rfc2119" title="MUST">MUST</em> also be in that <code>X509Data</code> element.</p> <p>Any <code>X509IssuerSerial</code>, <code>X509SKI</code>, <code>X509SubjectName</code>, and <code>dsig11:X509Digest</code> elements that relate to the same key but different certificates <em class="rfc2119" title="MUST">MUST</em> be grouped within a single <code>KeyInfo</code> but <em class="rfc2119" title="MAY">MAY</em> occur in multiple <code>X509Data</code> elements.</p> <p>Note that if <code>X509Data</code> child elements are used to identify a trusted certificate (rather than solely as an untrusted hint supplemented by validation by policy), the complete set of such elements that are intended to identify a certificate <em class="rfc2119" title="SHOULD">SHOULD</em> be integrity protected, typically by signing an entire <code>X509Data</code> or <code>KeyInfo</code> element.</p> <p>All certificates appearing in an <code>X509Data</code> element <em class="rfc2119" title="MUST">MUST</em> relate to the validation key by either containing it or being part of a certification chain that terminates in a certificate containing the validation key.</p> <p>No ordering is implied by the above constraints. The comments in the following instance demonstrate these constraints:</p> <div><div class="example"><div class="example-title"><span>Example 9</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;KeyInfo&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Data&gt;</span><span class="pln"> </span><span class="com">&lt;!-- two pointers to certificate-A --&gt;</span><span class="pln"> </span><span class="tag">&lt;X509IssuerSerial&gt;</span><span class="pln"> </span><span class="tag">&lt;X509IssuerName&gt;</span><span class="pln"> CN=TAMURA Kent, OU=TRL, O=IBM, L=Yamato-shi, ST=Kanagawa, C=JP </span><span class="tag">&lt;/X509IssuerName&gt;</span><span class="pln"> </span><span class="tag">&lt;X509SerialNumber&gt;</span><span class="pln">12345678</span><span class="tag">&lt;/X509SerialNumber&gt;</span><span class="pln"> </span><span class="tag">&lt;/X509IssuerSerial&gt;</span><span class="pln"> </span><span class="tag">&lt;X509SKI&gt;</span><span class="pln">31d97bd7</span><span class="tag">&lt;/X509SKI&gt;</span><span class="pln"> </span><span class="tag">&lt;/X509Data&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Data&gt;</span><span class="com">&lt;!-- single pointer to certificate-B --&gt;</span><span class="pln"> </span><span class="tag">&lt;X509SubjectName&gt;</span><span class="pln">Subject of Certificate B</span><span class="tag">&lt;/X509SubjectName&gt;</span><span class="pln"> </span><span class="tag">&lt;/X509Data&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Data&gt;</span><span class="pln"> </span><span class="com">&lt;!-- certificate chain --&gt;</span><span class="pln"> </span><span class="com">&lt;!--Signer cert, issuer CN=arbolCA,OU=FVT,O=IBM,C=US, serial 4--&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Certificate&gt;</span><span class="pln">MIICXTCCA..</span><span class="tag">&lt;/X509Certificate&gt;</span><span class="pln"> </span><span class="com">&lt;!-- Intermediate cert subject CN=arbolCA,OU=FVT,O=IBM,C=US issuer CN=tootiseCA,OU=FVT,O=Bridgepoint,C=US --&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Certificate&gt;</span><span class="pln">MIICPzCCA...</span><span class="tag">&lt;/X509Certificate&gt;</span><span class="pln"> </span><span class="com">&lt;!-- Root cert subject CN=tootiseCA,OU=FVT,O=Bridgepoint,C=US --&gt;</span><span class="pln"> </span><span class="tag">&lt;X509Certificate&gt;</span><span class="pln">MIICSTCCA...</span><span class="tag">&lt;/X509Certificate&gt;</span><span class="pln"> </span><span class="tag">&lt;/X509Data&gt;</span><span class="pln"> </span><span class="tag">&lt;/KeyInfo&gt;</span></pre></div></div> <p>Note, there is no direct provision for a PKCS#7 encoded "bag" of certificates or CRLs. However, a set of certificates and CRLs can occur within an <code>X509Data</code> element and multiple <code>X509Data</code> elements can occur in a <code>KeyInfo</code>. Whenever multiple certificates occur in an <code>X509Data</code> element, at least one such certificate must contain the public key which verifies the signature.</p> <p>While in principle many certificate encodings are possible, it is <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> that certificates appearing in an <code>X509Certificate</code> element be limited to an encoding of BER or its DER subset, allowing that within the certificate other content may be present. The use of other encodings may lead to interoperability issues. In any case, XML Signature implementations <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> alter or re-encode certificates, as doing so could invalidate their signatures.</p> <p>The <code>X509IssuerSerial</code> element has been deprecated in favor of the newly-introduced <code>dsig11:X509Digest</code> element. The XML Schema type of the serial number was defined to be an integer, and XML Schema validators may not support integer types with decimal data exceeding 18 decimal digits [<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>]. This has proven insufficient, because many Certificate Authorities issue certificates with large, random serial numbers that exceed this limit. As a result, deployments that do make use of this element should take care if schema validation is involved. New deployments <em class="rfc2119" title="SHOULD">SHOULD</em> avoid use of the element.</p> <section id="dname-encrules"> <h5><span class="secno">4.5.4.1 </span>Distinguished Name Encoding Rules</h5> <p>To encode a distinguished name (<code>X509IssuerSerial</code>,<code>X509SubjectName</code>, and <code>KeyName</code> if appropriate), the encoding rules in section 2 of RFC 4514 [<cite><a class="bibref" href="#bib-LDAP-DN">LDAP-DN</a></cite>] <em class="rfc2119" title="SHOULD">SHOULD</em> be applied, except that the character escaping rules in section 2.4 of RFC 4514 [<cite><a class="bibref" href="#bib-LDAP-DN">LDAP-DN</a></cite>] <em class="rfc2119" title="MAY">MAY</em> be augmented as follows:</p> <ul> <li>Escape all occurrences of ASCII control characters (Unicode range \x00 - \x1f) by replacing them with "\" followed by a two digit hex number showing its Unicode number.</li> <li>Escape any trailing space characters (Unicode \x20) by replacing them with "\20", instead of using the escape sequence "\ ".</li> </ul> <p>Since an XML document logically consists of characters, not octets, the resulting Unicode string is finally encoded according to the character encoding used for producing the physical representation of the XML document.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509Data"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:X509DataType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509DataType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509IssuerSerial"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:X509IssuerSerialType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509SKI"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509SubjectName"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509Certificate"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509CRL"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- &lt;element ref="dsig11:X509Digest"/&gt; --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- The X509Digest element (XMLDSig 1.1) will use the any element --&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509IssuerSerialType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509IssuerName"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509SerialNumber"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"integer"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="com">&lt;!-- Note, this schema permits X509Data to be empty; this is precluded by the text in &lt;a href="#sec-KeyInfo" class="sectionRef"&gt;&lt;/a&gt; which states that at least one element from the dsig namespace should be present in the PGP, SPKI, and X509 structures. This is easily expressed for the other key types, but not for X509Data because of its rich structure. --&gt;</span><span class="pln"> </span><span class="com">&lt;!-- targetNameSpace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509Digest"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:X509DigestType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"X509DigestType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;extension</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Algorithm"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/extension&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> </section> <section id="sec-PGPData"> <h4><span class="secno">4.5.5 </span>The <code>PGPData</code> Element</h4> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="PGPData" href="https://www.w3.org/2000/09/xmldsig#PGPData">http://www.w3.org/2000/09/xmldsig#PGPData</a></code> "<br> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>The <code>PGPData</code> element within <code>KeyInfo</code> is used to convey information related to PGP public key pairs and signatures on such keys. The <code>PGPKeyID</code>'s value is a base64Binary sequence containing a standard PGP public key identifier as defined in [<cite><a class="bibref" href="#bib-PGP">PGP</a></cite>] section 11.2]. The <code>PGPKeyPacket</code> contains a base64-encoded Key Material Packet as defined in [<cite><a class="bibref" href="#bib-PGP">PGP</a></cite>] section 5.5]. These children element types can be complemented/extended by siblings from an external namespace within <code>PGPData</code>, or <code>PGPData</code> can be replaced all together with an alternative PGP XML structure as a child of <code>KeyInfo</code>. <code>PGPData</code> must contain one <code>PGPKeyID</code> and/or one <code>PGPKeyPacket</code> and 0 or more elements from an external namespace.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PGPData"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:PGPDataType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PGPDataType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PGPKeyID"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PGPKeyPacket"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"PGPKeyPacket"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-SPKIData"> <h4><span class="secno">4.5.6 </span>The <code>SPKIData</code> Element</h4> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="SPKIData" href="https://www.w3.org/2000/09/xmldsig#SPKIData">http://www.w3.org/2000/09/xmldsig#SPKIData</a></code> "<br> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>The <code>SPKIData</code> element within <code>KeyInfo</code> is used to convey information related to SPKI public key pairs, certificates and other SPKI data. <code>SPKISexp</code> is the base64 encoding of a SPKI canonical S-expression. <code>SPKIData</code> must have at least one <code>SPKISexp</code>; <code>SPKISexp</code> can be complemented/extended by siblings from an external namespace within <code>SPKIData</code>, or <code> SPKIData</code> can be entirely replaced with an alternative SPKI XML structure as a child of <code>KeyInfo</code>.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SPKIData"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SPKIDataType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SPKIDataType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SPKISexp"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-MgmtData"> <h4><span class="secno">4.5.7 </span>The <code>MgmtData</code> Element</h4> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="MgmtData" href="https://www.w3.org/2000/09/xmldsig#MgmtData">http://www.w3.org/2000/09/xmldsig#MgmtData</a></code> "<br> (this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type)</dd> </dl> The <code>MgmtData</code> element within <code>KeyInfo</code> is a string value used to convey in-band key distribution or agreement data. However, use of this element is <em class="rfc2119" title="NOT RECOMMENDED">NOT RECOMMENDED</em> and <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be used. The <a href="#sec-keyconvenance" class="sectionRef sec-ref">section 4.5.8 XML Encryption EncryptedKey and DerivedKey Elements</a> describes new <code>KeyInfo</code> types for conveying key information. <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"MgmtData"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-keyconvenance"> <h4><span class="secno">4.5.8 </span>XML Encryption <code>EncryptedKey</code> and <code>DerivedKey</code> Elements</h4> The <code>&lt;xenc:EncryptedKey&gt;</code> and <code>&lt;xenc:DerivedKey&gt;</code> elements defined in [<cite><a class="bibref" href="#bib-XMLENC-CORE1">XMLENC-CORE1</a></cite>] as children of <code>ds:KeyInfo</code> can be used to convey in-band encrypted or derived key material. In particular, the <code>xenc:DerivedKey</code>&gt; element may be present when the key used in calculating a Message Authentication Code is derived from a shared secret. </section> <section id="sec-DEREncodedKeyValue"> <h4><span class="secno">4.5.9 </span>The <code>DEREncodedKeyValue</code> Element</h4> <dl> <dt>Identifier</dt> <dd><code>Type="<a id="DEREncodedKeyValue" href="https://www.w3.org/2009/xmldsig11#DEREncodedKeyValue">http://www.w3.org/2009/xmldsig11#DEREncodedKeyValue</a>"<br></code>(this can be used within a <code>RetrievalMethod</code> or <code>Reference</code> element to identify the referent's type) </dd> </dl> <p>The public key algorithm and value are DER-encoded in accordance with the value that would be used in the Subject Public Key Info field of an X.509 certificate, per section 4.1.2.7 of [<cite><a class="bibref" href="#bib-RFC5280">RFC5280</a></cite>]. The DER-encoded value is then base64-encoded.</p> <p>For the key value types supported in this specification, refer to the following for normative references on the format of Subject Public Key Info and the relevant OID values that identify the key/algorithm type:</p> <dl> <dt>RSA</dt> <dd>See section 2.3.1 of [<cite><a class="bibref" href="#bib-RFC3279">RFC3279</a></cite>]</dd> <dt>DSA</dt> <dd>See section 2.3.2 of [<cite><a class="bibref" href="#bib-RFC3279">RFC3279</a></cite>]</dd> <dt>EC</dt> <dd>See section 2 of [<cite><a class="bibref" href="#bib-RFC5480">RFC5480</a></cite>]</dd> </dl> <p>Specifications that define additional key types should provide such a normative reference for their own key types where possible.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DEREncodedKeyValue"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:DEREncodedKeyValueType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"DEREncodedKeyValueType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;extension</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"base64Binary"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/extension&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleContent&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> <p> Historical note: The <code>DEREncodedKeyValue</code> element was added to XML Signature 1.1 in order to support certain interoperability scenarios where at least one of signer and/or verifier are not able to serialize keys in the XML formats described in <a href="#sec-KeyValue" class="sectionRef sec-ref">section 4.5.2 The KeyValue Element</a> above. The <code>KeyValue</code> element is to be used for "bare" XML key representations (not XML wrappings around other binary encodings like ASN.1 DER); for this reason the <code>DEREncodedKeyValue</code> element is not a child of <code>KeyValue</code>. The <code>DEREncodedKeyValue</code> element is also not a child of the <code>X509Data</code> element, as the keys represented by <code>DEREncodedKeyValue</code> may not have X.509 certificates associated with them (a requirement for <code>X509Data</code>). </p> </section> <section id="sec-KeyInfoReference"> <h4><span class="secno">4.5.10 </span>The <code>KeyInfoReference</code> Element</h4> <p> A <code>KeyInfoReference</code> element within <code>KeyInfo</code> is used to convey a reference to a <code>KeyInfo</code> element at another location in the same or different document. For example, several signatures in a document might use a key verified by an X.509v3 certificate chain appearing once in the document or remotely outside the document; each signature's <code>KeyInfo</code> can reference this chain using a single <code>KeyInfoReference</code> element instead of including the entire chain with a sequence of <code>X509Certificate</code> elements repeated in multiple places. </p> <p> <code>KeyInfoReference</code> uses the same syntax and dereferencing behavior as <code>Reference</code>'s <code>URI</code> ( <a href="#sec-URI" class="sectionRef sec-ref">section 4.4.3.1 The URI Attribute</a>) and the Reference Processing Model (<a href="#sec-ReferenceProcessingModel" class="sectionRef sec-ref">section 4.4.3.2 The Reference Processing Model</a>) except that there are no child elements and the presence of the <code>URI</code> attribute is mandatory. </p> <p> The result of dereferencing a <code>KeyInfoReference</code> <em class="rfc2119" title="MUST">MUST</em> be a <code>KeyInfo</code> element, or an XML document with a <code>KeyInfo</code> element as the root. </p> <p> <strong>Note:</strong> The <code>KeyInfoReference</code> element is a desirable alternative to the use of <code>RetrievalMethod</code> when the data being referred to is a <code>KeyInfo</code> element and the use of <code>RetrievalMethod</code> would require one or more <code>Transform</code> child elements, which introduce security risk and implementation challenges. </p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="com">&lt;!-- targetNamespace="http://www.w3.org/2009/xmldsig11#" --&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyInfoReference"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"dsig11:KeyInfoReferenceType"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"KeyInfoReferenceType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"URI"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> </section> <section id="sec-Object"> <h3><span class="secno">4.6 </span>The <code>Object</code> Element</h3> <dl> <dt>Identifier</dt> <dd><code>Type=<a id="Object" href="https://www.w3.org/2000/09/xmldsig#Object">"http://www.w3.org/2000/09/xmldsig#Object"</a><br></code> (this can be used within a <code>Reference</code> element to identify the referent's type)</dd> </dl> <p><code>Object</code> is an optional element that may occur one or more times. When present, this element may contain any data. The <code>Object</code> element may include optional MIME type, ID, and encoding attributes.</p> <p>The <code>Object</code>'s <code>Encoding</code> attributed may be used to provide a URI that identifies the method by which the object is encoded (e.g., a binary file).</p> <p>The <code>MimeType</code> attribute is an optional attribute which describes the data within the <code>Object</code> (independent of its encoding). This is a string with values defined by [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>]. For example, if the <code>Object</code> contains base64 encoded <a href="https://www.w3.org/Graphics/PNG/">PNG</a>, the <code> Encoding</code> may be specified as 'http://www.w3.org/2000/09/xmldsig#base64' and the <code>MimeType</code> as 'image/png'. This attribute is purely advisory; no validation of the <code>MimeType</code> information is required by this specification. Applications which require normative type and encoding information for signature validation should specify <code><a href="#sec-Transforms">Transforms</a></code> with well defined resulting types and/or encodings.</p> <p>The <code>Object</code>'s <code>Id</code> is commonly referenced from a <code> Reference</code> in <code>SignedInfo</code>, or <code>Manifest</code>. This element is typically used for <a href="#def-SignatureEnveloping" class="link-def">enveloping signatures</a> where the object being signed is to be included in the signature element. The digest is calculated over the entire <code>Object</code> element including start and end tags.</p> <p>Note, if the application wishes to exclude the <code>&lt;Object&gt;</code> tags from the digest calculation the <code>Reference</code> must identify the actual data object (easy for XML documents) or a transform must be used to remove the <code>Object</code> tags (likely where the data object is non-XML). Exclusion of the object tags may be desired for cases where one wants the signature to remain valid if the data object is moved from inside a signature to outside the signature (or vice versa), or where the content of the <code>Object</code> is an encoding of an original binary document and it is desired to extract and decode so as to sign the original bitwise representation.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Object"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:ObjectType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ObjectType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence</span><span class="pln"> </span><span class="atn">minOccurs</span><span class="pun">=</span><span class="atv">"0"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##any"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"MimeType"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"string"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Encoding"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> </section> <section id="sec-AdditionalSyntax"> <!--OddPage--><h2><span class="secno">5. </span>Additional Signature Syntax</h2> <p>This section describes the optional to implement <code>Manifest</code> and <code>SignatureProperties</code> elements and describes the handling of XML processing instructions and comments. With respect to the elements <code>Manifest</code> and <code>SignatureProperties</code> this section specifies syntax and little behavior -- it is left to the application. These elements can appear anywhere the parent's content model permits; the <code> Signature</code> content model only permits them within <code>Object</code>.</p> <section id="sec-Manifest"> <h3><span class="secno">5.1 </span>The <code>Manifest</code> Element</h3> <dl> <dt>Identifier</dt> <dd><code>Type=<a id="Manifest" href="https://www.w3.org/2000/09/xmldsig#Manifest">"http://www.w3.org/2000/09/xmldsig#Manifest"</a><br> </code> (this can be used within a <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>The <code>Manifest</code> element provides a list of <code>Reference</code>s. The difference from the list in <code>SignedInfo</code> is that it is application defined which, if any, of the digests are actually checked against the objects referenced and what to do if the object is inaccessible or the digest compare fails. If a <code>Manifest</code> is pointed to from <code>SignedInfo</code>, the digest over the <code>Manifest</code> itself will be checked by the core signature validation behavior. The digests within such a <code>Manifest</code> are checked at the application's discretion. If a <code> Manifest</code> is referenced from another <code>Manifest</code>, even the overall digest of this two level deep <code> Manifest</code> might not be checked.</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Manifest"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:ManifestType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"ManifestType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:Reference"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span></pre></div> </section> <section id="sec-SignatureProperties"> <h3><span class="secno">5.2 </span>The <code>SignatureProperties</code> Element</h3> <dl> <dt>&nbsp;</dt> <dt>Identifier</dt> <dd><code>Type="<a id="SignatureProperties" href="https://www.w3.org/2000/09/xmldsig#SignatureProperties">http://www.w3.org/2000/09/xmldsig#SignatureProperties</a>"<br> </code> (this can be used within a <code>Reference</code> element to identify the referent's type)</dd> </dl> <p>Additional information items concerning the generation of the signature(s) can be placed in a <code>SignatureProperty</code> element (i.e., date/time stamp or the serial number of cryptographic hardware used in signature generation).</p> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureProperties"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignaturePropertiesType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignaturePropertiesType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">ref</span><span class="pun">=</span><span class="atv">"ds:SignatureProperty"</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/sequence&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span><span class="pln"> </span><span class="tag">&lt;element</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignatureProperty"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ds:SignaturePropertyType"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;complexType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"SignaturePropertyType"</span><span class="pln"> </span><span class="atn">mixed</span><span class="pun">=</span><span class="atv">"true"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;choice</span><span class="pln"> </span><span class="atn">maxOccurs</span><span class="pun">=</span><span class="atv">"unbounded"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;any</span><span class="pln"> </span><span class="atn">namespace</span><span class="pun">=</span><span class="atv">"##other"</span><span class="pln"> </span><span class="atn">processContents</span><span class="pun">=</span><span class="atv">"lax"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="com">&lt;!-- (1,1) elements from (1,unbounded) namespaces --&gt;</span><span class="pln"> </span><span class="tag">&lt;/choice&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Target"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"anyURI"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"required"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;attribute</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"Id"</span><span class="pln"> </span><span class="atn">type</span><span class="pun">=</span><span class="atv">"ID"</span><span class="pln"> </span><span class="atn">use</span><span class="pun">=</span><span class="atv">"optional"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/complexType&gt;</span></pre></div> </section> <section id="sec-PI"> <h3><span class="secno">5.3 </span>Processing Instructions in Signature Elements</h3> <p>No XML processing instructions (PIs) are used by this specification.</p> <p>Note that PIs placed inside <code>SignedInfo</code> by an application will be signed unless the <code>CanonicalizationMethod</code> algorithm discards them. (This is true for any signed XML content.) All of the <code>CanonicalizationMethod</code>s identified within this specification retain PIs. When a PI is part of content that is signed (e.g., within <code> SignedInfo</code> or referenced XML documents) any change to the PI will obviously result in a signature failure.</p> </section> <section id="sec-comments"> <h3><span class="secno">5.4 </span>Comments in Signature Elements</h3> <p>XML comments are not used by this specification.</p> <p>Note that unless <code>CanonicalizationMethod</code> removes comments within <code>SignedInfo</code> or any other referenced XML (which [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] does), they will be signed. Consequently, if they are retained, a change to the comment will cause a signature failure. Similarly, the XML signature over any XML data will be sensitive to comment changes unless a comment-ignoring canonicalization/transform method, such as the Canonical XML [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>], is specified.</p> </section> </section> <section id="sec-Algorithms"> <!--OddPage--><h2><span class="secno">6. </span>Algorithms</h2> <p>This section identifies algorithms used with the XML digital signature specification. Entries contain the identifier to be used in <code>Signature</code> elements, a reference to the formal specification, and definitions, where applicable, for the representation of keys and the results of cryptographic operations.</p> <section id="sec-AlgID"> <h3><span class="secno">6.1 </span>Algorithm Identifiers and Implementation Requirements</h3> <p>Algorithms are identified by URIs that appear as an attribute to the element that identifies the algorithms' role (<code>DigestMethod</code>, <code> Transform</code>, <code>SignatureMethod</code>, or <code>CanonicalizationMethod</code>). All algorithms used herein take parameters but in many cases the parameters are implicit. For example, a <code> SignatureMethod</code> is implicitly given two parameters: the keying info and the output of <code>CanonicalizationMethod</code>. Explicit additional parameters to an algorithm appear as content elements within the algorithm role element. Such parameter elements have a descriptive element name, which is frequently algorithm specific, and <em class="rfc2119" title="MUST">MUST</em> be in the XML Signature namespace or an algorithm specific namespace.</p> <p>This specification defines a set of algorithms, their URIs, and requirements for implementation. Requirements are specified over implementation, not over requirements for signature use. Furthermore, the mechanism is extensible; alternative algorithms may be used by signature applications.</p> <dl> <dt>Digest</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>SHA1 (Use is DISCOURAGED; see <a href="#sec-MessageDigests">SHA-1 Warning</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a></li> <li>SHA256<br> <a href="https://www.w3.org/2001/04/xmlenc#sha256">http://www.w3.org/2001/04/xmlenc#sha256</a></li> </ol> </dd> <dd><strong>Optional</strong> <ol> <li>SHA224<br> <a href="https://www.w3.org/2001/04/xmldsig-more#sha224">http://www.w3.org/2001/04/xmldsig-more#sha224</a></li> <li>SHA384<br> <a href="https://www.w3.org/2001/04/xmldsig-more#sha384">http://www.w3.org/2001/04/xmldsig-more#sha384</a></li> <li>SHA512<br> <a href="https://www.w3.org/2001/04/xmlenc#sha512">http://www.w3.org/2001/04/xmlenc#sha512</a></li> </ol> </dd> <dt>Encoding</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>base64 (<a href="#base64note">*note</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#base64"><span style="font-weight: normal">http://www.w3.org/2000/09/xmldsig#</span>base64</a></li> </ol> </dd> <dt>MAC</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>HMAC-SHA1 (Use is DISCOURAGED; see <a href="#sec-MessageDigests">SHA-1 Warning</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#hmac-sha1">http://www.w3.org/2000/09/xmldsig#hmac-sha1</a></li> <li>HMAC-SHA256<br> <a href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha256">http://www.w3.org/2001/04/xmldsig-more#hmac-sha256</a></li> </ol> </dd> <dd><strong>Recommended</strong></dd> <dd><ol> <li>HMAC-SHA384<br> <a href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha384">http://www.w3.org/2001/04/xmldsig-more#hmac-sha384</a></li> <li>HMAC-SHA512<br> <a href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha512">http://www.w3.org/2001/04/xmldsig-more#hmac-sha512</a></li> </ol> </dd> <dd><strong>Optional</strong></dd> <dd><ol> <li>HMAC-SHA224<br> <a href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha224">http://www.w3.org/2001/04/xmldsig-more#hmac-sha224</a></li> </ol> </dd> <dt>Signature</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>RSAwithSHA256<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</span></a> [<a href="#sec-PKCS1" class="sectionRef sec-ref">section 6.4.2 RSA (PKCS#1 v1.5)</a>] </li> <li>ECDSAwithSHA256<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256</span></a> [<a href="#sec-ECDSA" class="sectionRef sec-ref">section 6.4.3 ECDSA</a>]</li> <li>DSAwithSHA1<br> (<strong>signature verification</strong>)<br> <a href="https://www.w3.org/2000/09/xmldsig#dsa-sha1">http://www.w3.org/2000/09/xmldsig#dsa-sha1</a> [<a href="#sec-DSA" class="sectionRef sec-ref">section 6.4.1 DSA</a>]</li> </ol></dd> <dd><strong>Recommended</strong></dd> <dd><ol> <li>RSAwithSHA1<br> (<strong>signature verification</strong>; use for signature generation is DISCOURAGED; see <a href="#sec-MessageDigests">SHA-1 Warning</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#rsa-sha1"><span style="font-weight: normal">http://www.w3.org/2000/09/xmldsig#</span>rsa-sha1</a></li> </ol></dd> <dd><strong>Optional</strong></dd> <dd><ol> <li>RSAwithSHA224<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#rsa-sha224</span></a> [<a href="#sec-PKCS1" class="sectionRef sec-ref">section 6.4.2 RSA (PKCS#1 v1.5)</a>]</li> <li>RSAwithSHA384<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#rsa-sha384</span></a> [<a href="#sec-PKCS1" class="sectionRef sec-ref">section 6.4.2 RSA (PKCS#1 v1.5)</a>]</li> <li>RSAwithSHA512<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#rsa-sha512</span></a> </li> <li>ECDSAwithSHA1 (Use is DISCOURAGED; see <a href="#sec-MessageDigests">SHA-1 Warning</a>)<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1</span></a> [<a href="#sec-ECDSA" class="sectionRef sec-ref">section 6.4.3 ECDSA</a>]</li> <li>ECDSAwithSHA224<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224</span></a> [<a href="#sec-ECDSA" class="sectionRef sec-ref">section 6.4.3 ECDSA</a>]</li> <li>ECDSAwithSHA384<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384</span></a> [<a href="#sec-ECDSA" class="sectionRef sec-ref">section 6.4.3 ECDSA</a>]</li> <li>ECDSAwithSHA512<br> <a href="http://tools.ietf.org/html/rfc6931"> <span style="font-weight: normal"> http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512</span></a> [<a href="#sec-ECDSA" class="sectionRef sec-ref">section 6.4.3 ECDSA</a>]</li> <li>DSAwithSHA1<br> (<strong>signature generation</strong>)<br> <a href="https://www.w3.org/2000/09/xmldsig#dsa-sha1"> <span style="font-weight: normal">http://www.w3.org/2000/09/xmldsig#dsa-sha1</span></a> [<a href="#sec-DSA" class="sectionRef sec-ref">section 6.4.1 DSA</a>]</li> <li>DSAwithSHA256<br> <a href="https://www.w3.org/2009/xmldsig11#dsa-sha256"> <span style="font-weight: normal"> http://www.w3.org/2009/xmldsig11#dsa-sha256</span></a> [<a href="#sec-DSA" class="sectionRef sec-ref">section 6.4.1 DSA</a>]</li> </ol> </dd> <dt>Canonicalization</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>Canonical XML 1.0 (omit comments)<br> <a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</a></li> <li>Canonical XML 1.1 (omit comments)<br> <a href="https://www.w3.org/2006/12/xml-c14n11">http://www.w3.org/2006/12/xml-c14n11</a></li> <li>Exclusive XML Canonicalization 1.0 (omit comments)<br> <a href="https://www.w3.org/2001/10/xml-exc-c14n#"> http://www.w3.org/2001/10/xml-exc-c14n#</a></li> </ol></dd> <dd><strong>Recommended</strong></dd> <dd><ol> <li>Canonical XML 1.0 (with comments)<br> <a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</a></li> <li>Canonical XML 1.1 (with comments)<br> <a href="https://www.w3.org/2006/12/xml-c14n11#WithComments">http://www.w3.org/2006/12/xml-c14n11#WithComments</a></li> <li>Exclusive XML Canonicalization 1.0 (with comments)<br> <a href="https://www.w3.org/2001/10/xml-exc-c14n#WithComments">http://www.w3.org/2001/10/xml-exc-c14n#WithComments</a></li> </ol> </dd> <dt>Transform</dt> <dd><strong>Required</strong></dd> <dd> <ol> <li>base64 (<a href="#base64note">*note</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#base64"><span style="font-weight: normal">http://www.w3.org/2000/09/xmldsig#</span>base64</a></li> <li>Enveloped Signature (<a href="#esignote">**note</a>)<br> <a href="https://www.w3.org/2000/09/xmldsig#enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</a></li> </ol> </dd> <dd><strong>Recommended</strong></dd> <dd><ol> <li>XPath<br> <a href="https://www.w3.org/TR/1999/REC-xpath-19991116">http://www.w3.org/TR/1999/REC-xpath-19991116</a></li> <li>XPath Filter 2.0<br> <a href="https://www.w3.org/2002/06/xmldsig-filter2">http://www.w3.org/2002/06/xmldsig-filter2</a></li> </ol></dd> <dd><strong>Optional</strong></dd> <dd> <ol> <li>XSLT<br> <a href="https://www.w3.org/TR/1999/REC-xslt-19991116">http://www.w3.org/TR/1999/REC-xslt-19991116</a></li> </ol> </dd> </dl> <div id="base64note"> <p>*note: Note that the same URI is used to identify base64 both in "encoding" context (e.g. within the <code>Object</code> element) as well as in "transform" context (when identifying a base64 transform).</p> </div> <div id="esignote"> <p>**note: The Enveloped Signature transform removes the <code>Signature</code> element from the calculation of the signature when the signature is within the content that it is being signed. This <em class="rfc2119" title="MAY">MAY</em> be implemented via the XPath specification specified in 6.6.4: <a href="#sec-EnvelopedSignature">Enveloped Signature Transform</a>; it <em class="rfc2119" title="MUST">MUST</em> have the same effect as that specified by the XPath Transform.</p> </div> <p>When using transforms, we RECOMMEND selecting the least expressive choice that still accomplishes the needs of the use case at hand: Use of XPath filter 2.0 is recommended over use of XPath filter. Use of XPath filter is recommended over use of XSLT.</p> <p><strong>Note:</strong> Implementation requirements for the XPath transform may be downgraded to <em class="rfc2119" title="OPTIONAL">OPTIONAL</em> in a future version of this specification.</p> </section> <section id="sec-MessageDigests"> <h3><span class="secno">6.2 </span>Message Digests</h3> <p>This specification defines several possible digest algorithms for the DigestMethod element, including <em class="rfc2119" title="REQUIRED">REQUIRED</em> algorithm SHA-256. Use of SHA-256 is strongly recommended over SHA-1 because recent advances in cryptanalysis (see e.g. [<cite><a class="bibref" href="#bib-SHA-1-Analysis">SHA-1-Analysis</a></cite>]) have cast doubt on the long-term collision resistance of SHA-1. Therefore, SHA-1 support is <em class="rfc2119" title="REQUIRED">REQUIRED</em> in this specification only for backwards-compatibility reasons. </p> <p>Digest algorithms that are known not to be collision resistant <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be used in DigestMethod elements. For example, the <a href="http://www.ietf.org/rfc/rfc1321.txt">MD5</a> message digest algorithm <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be used as specific collisions have been demonstrated for that algorithm.</p> <section id="sec-SHA-1"> <h4><span class="secno">6.2.1 </span>SHA-1</h4> <dl> <dt>Identifier:</dt> <dd><a id="sha1" href="https://www.w3.org/2000/09/xmldsig#sha1">http://www.w3.org/2000/09/xmldsig#sha1</a></dd> </dl> <p> <strong>Note:</strong> Use of SHA-256 is strongly recommended over SHA-1 because recent advances in cryptanalysis (see e.g. [<cite><a class="bibref" href="#bib-SHA-1-Analysis">SHA-1-Analysis</a></cite>], [<cite><a class="bibref" href="#bib-SHA-1-Collisions">SHA-1-Collisions</a></cite>] ) have cast doubt on the long-term collision resistance of SHA-1. </p> <p>The <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">SHA-1</a> algorithm [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>] takes no explicit parameters. An example of an SHA-1 DigestAlg element is:</p> <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;DigestMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#sha1"</span><span class="tag">/&gt;</span></pre></div> <p>A SHA-1 digest is a 160-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 20-octet octet stream. For example, the DigestValue element for the message digest:</p> <div class="example"><div class="example-title"><span>Example 11</span></div><pre class="example highlight prettyprint"><span class="pln">A9993E36 </span><span class="lit">4706816A</span><span class="pln"> BA3E2571 </span><span class="lit">7850C26C</span><span class="pln"> </span><span class="lit">9CD0D89D</span></pre></div> <p>from Appendix A of the SHA-1 standard would be:</p> <div class="example"><div class="example-title"><span>Example 12</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;DigestValue&gt;</span><span class="pln">qZk+NkcGgWq6PiVxeFDCbJzQ2J0=</span><span class="tag">&lt;/DigestValue&gt;</span></pre></div> </section> <section id="sec-SHA-224"> <h4><span class="secno">6.2.2 </span>SHA-224</h4> <dl> <dt>Identifier:</dt> <dd><a id="sha-224" href="https://www.w3.org/2001/04/xmldsig-more#sha224">http://www.w3.org/2001/04/xmldsig-more#sha224</a></dd> </dl> <p>The <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">SHA-224</a> algorithm [<cite><a class="bibref" href="#bib-FIPS-180-3">FIPS-180-3</a></cite>] takes no explicit parameters. A SHA-224 digest is a 224-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 28-octet octet stream.</p> </section> <section id="sec-SHA-256"> <h4><span class="secno">6.2.3 </span>SHA-256</h4> <dl> <dt>Identifier:</dt> <dd><a id="sha-256" href="https://www.w3.org/2001/04/xmlenc#sha256">http://www.w3.org/2001/04/xmlenc#sha256</a></dd> </dl> <p>The <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">SHA-256</a> algorithm [<cite><a class="bibref" href="#bib-FIPS-180-3">FIPS-180-3</a></cite>] takes no explicit parameters. A SHA-256 digest is a 256-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 32-octet octet stream.</p> </section> <section id="sec-SHA-384"> <h4><span class="secno">6.2.4 </span>SHA-384</h4> <dl> <dt>Identifier:</dt> <dd><a id="sha-384" href="https://www.w3.org/2001/04/xmldsig-more#sha384">http://www.w3.org/2001/04/xmldsig-more#sha384</a></dd> </dl> <p>The <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">SHA-384</a> algorithm [<cite><a class="bibref" href="#bib-FIPS-180-3">FIPS-180-3</a></cite>] takes no explicit parameters. A SHA-384 digest is a 384-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 48-octet octet stream.</p> </section> <section id="sec-SHA-512"> <h4><span class="secno">6.2.5 </span>SHA-512</h4> <dl> <dt>Identifier:</dt> <dd><a id="sha-512" href="https://www.w3.org/2001/04/xmlenc#sha512">http://www.w3.org/2001/04/xmlenc#sha512</a></dd> </dl> <p>The <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">SHA-512</a> algorithm [<cite><a class="bibref" href="#bib-FIPS-180-3">FIPS-180-3</a></cite>] takes no explicit parameters. A SHA-512 digest is a 512-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 64-octet octet stream.</p> </section> </section> <section id="sec-MACs"> <h3><span class="secno">6.3 </span>Message Authentication Codes</h3> <p>MAC algorithms take two implicit parameters, their keying material determined from <code>KeyInfo</code> and the octet stream output by <code> CanonicalizationMethod</code>. MACs and signature algorithms are syntactically identical but a MAC implies a shared secret key.</p> <section id="sec-HMAC"> <h4><span class="secno">6.3.1 </span>HMAC</h4> <dl> <dt>Identifier:</dt> <dd><a id="hmac-sha1" href="https://www.w3.org/2000/09/xmldsig#hmac-sha1">http://www.w3.org/2000/09/xmldsig#hmac-sha1</a></dd> <dd><a id="hmac-sha224" href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha224">http://www.w3.org/2001/04/xmldsig-more#hmac-sha224</a></dd> <dd><a id="hmac-sha256" href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha256">http://www.w3.org/2001/04/xmldsig-more#hmac-sha256</a></dd> <dd><a id="hmac-sha384" href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha384">http://www.w3.org/2001/04/xmldsig-more#hmac-sha384</a></dd> <dd><a id="hmac-sha512" href="https://www.w3.org/2001/04/xmldsig-more#hmac-sha512">http://www.w3.org/2001/04/xmldsig-more#hmac-sha512</a></dd> </dl> <p>The <a href="http://www.ietf.org/rfc/rfc2104.txt">HMAC</a> algorithm (RFC2104 [<cite><a class="bibref" href="#bib-HMAC">HMAC</a></cite>]) takes the output (truncation) length in bits as a parameter; this specification REQUIRES that the truncation length be a multiple of 8 (i.e. fall on a byte boundary) because Base64 encoding operates on full bytes.&nbsp; If the truncation parameter is not specified then all the bits of the hash are output. Any signature with a truncation length that is less than half the output length of the underlying hash algorithm <em class="rfc2119" title="MUST">MUST</em> be deemed invalid. An example of an HMAC <code>SignatureMethod</code> element:</p> <div><div class="example"><div class="example-title"><span>Example 13</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;SignatureMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#hmac-sha1"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;HMACOutputLength&gt;</span><span class="pln">128</span><span class="tag">&lt;/HMACOutputLength&gt;</span><span class="pln"> </span><span class="tag">&lt;/SignatureMethod&gt;</span></pre></div></div> <p>The output of the HMAC algorithm is ultimately the output (possibly truncated) of the chosen digest algorithm. This value shall be base64 encoded in the same straightforward fashion as the output of the digest algorithms. Example: the <code>SignatureValue</code> element for the HMAC-SHA1 digest</p> <div class="example"><div class="example-title"><span>Example 14</span></div><pre class="example highlight prettyprint"><span class="lit">9294727A</span><span class="pln"> </span><span class="lit">3638BB1C</span><span class="pln"> </span><span class="lit">13F48EF8</span><span class="pln"> </span><span class="lit">158BFC9D</span></pre></div> <p>from the test vectors in [<cite><a class="bibref" href="#bib-HMAC">HMAC</a></cite>] would be</p> <div class="example"><div class="example-title"><span>Example 15</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;SignatureValue&gt;</span><span class="pln">kpRyejY4uxwT9I74FYv8nQ==</span><span class="tag">&lt;/SignatureValue&gt;</span></pre></div> <div><pre class="dtd highlight prettyprint"><span class="typ">Schema</span><span class="pln"> </span><span class="typ">Definition</span><span class="pun">:</span></pre><pre class="dtd highlight prettyprint"><span class="tag">&lt;simpleType</span><span class="pln"> </span><span class="atn">name</span><span class="pun">=</span><span class="atv">"HMACOutputLengthType"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;restriction</span><span class="pln"> </span><span class="atn">base</span><span class="pun">=</span><span class="atv">"integer"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/simpleType&gt;</span></pre></div> </section> </section> <section id="sec-SignatureAlg"> <h3><span class="secno">6.4 </span>Signature Algorithms</h3> <p>Signature algorithms take two implicit parameters, their keying material determined from <code>KeyInfo</code> and the octet stream output by <code> CanonicalizationMethod</code>. Signature and MAC algorithms are syntactically identical but a signature implies public key cryptography.</p> <section id="sec-DSA"> <h4><span class="secno">6.4.1 </span>DSA</h4> <dl> <dt>Identifier:</dt> <dd><a id="dsa-sha1" href="https://www.w3.org/2000/09/xmldsig#dsa-sha1">http://www.w3.org/2000/09/xmldsig#dsa-sha1</a></dd> <dd><a id="dsa-sha256" href="https://www.w3.org/2009/xmldsig11#dsa-sha256">http://www.w3.org/2009/xmldsig11#dsa-sha256</a></dd> </dl> <p>The DSA family of algorithms is defined in FIPS 186-3 [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>].&nbsp; FIPS 186-3 defines DSA in terms of two security parameters L and N where L = |p|, N = |q|, p is the prime modulus, q is a prime divisor of (p-1).&nbsp; FIPS 186-3 defines four valid pairs of (L, N); they are: (1024, 160), (2048, 224), (2048, 256) and (3072, 256).&nbsp; The pair (1024, 160) corresponds to the algorithm DSAwithSHA1, which is identified in this specification by the URI <a href="https://www.w3.org/2000/09/xmldsig#dsa-sha1">http://www.w3.org/2000/09/xmldsig#dsa-sha1</a>.&nbsp; The pairs (2048, 256) and (3072, 256) correspond to the algorithm DSAwithSHA256, which is identified in this specification by the URI <a href="https://www.w3.org/2009/xmldsig11#dsa-sha256"> http://www.w3.org/2009/xmldsig11#dsa-sha256</a>.&nbsp; This specification does not use the (2048, 224) instance of DSA (which corresponds to DSAwithSHA224).</p> <p>&nbsp;DSA takes no explicit parameters; an example of a DSA <code>SignatureMethod</code> element is:</p> <div class="example"><div class="example-title"><span>Example 16</span></div><pre class="example highlight prettyprint"><code><span class="tag">&lt;SignatureMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2009/xmldsig11#dsa-sha256"</span><span class="tag">/&gt;</span></code></pre></div> <p>The output of the DSA algorithm consists of a pair of integers usually referred by the pair (r, s). The signature value consists of the base64 encoding of the concatenation of two octet-streams that respectively result from the octet-encoding of the values r and s in that order. Integer to octet-stream conversion must be done according to the I2OSP operation defined in the <a href="http://www.ietf.org/rfc/rfc3447.txt">RFC 3447</a> [<cite><a class="bibref" href="#bib-PKCS1">PKCS1</a></cite>] specification with a <code>l</code> parameter equal to 20. For example, the <code>SignatureValue</code> element for a DSA signature (<code>r</code>, <code>s</code>) with values specified in hexadecimal:</p> <div class="example"><div class="example-title"><span>Example 17</span></div><pre class="example highlight prettyprint"><code><span class="pln">r </span><span class="pun">=</span><span class="pln"> </span><span class="lit">8BAC1AB6</span><span class="pln"> </span><span class="lit">6410435C</span><span class="pln"> B7181F95 B16AB97C </span><span class="lit">92B341C0</span></code><span class="pln"> </span><code><span class="pln">s </span><span class="pun">=</span><span class="pln"> </span><span class="lit">41E2345F</span><span class="pln"> </span><span class="lit">1F56DF24</span><span class="pln"> </span><span class="lit">58F426D1</span><span class="pln"> </span><span class="lit">55B4BA2D</span><span class="pln"> B6DCD8C8</span></code></pre></div> <p>from the example in Appendix 5 of the DSS standard would be</p> <div class="example"><div class="example-title"><span>Example 18</span></div><pre class="example highlight prettyprint"><code><span class="tag">&lt;SignatureValue&gt;</span></code><span class="pln"> </span><code><span class="pln">i6watmQQQ1y3GB+VsWq5fJKzQcBB4jRfH1bfJFj0JtFVtLotttzYyA==</span><span class="tag">&lt;/SignatureValue&gt;</span></code></pre></div> <h4 id="security-considerations-regarding-dsa-key-sizes">Security considerations regarding DSA key sizes</h4> <p> Per FIPS 186-3 [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>], the DSA security parameter L is defined to be 1024, 2048 or 3072 bits and the corresponding DSA q value is defined to be 160, 224/256 and 256 bits respectively. </p><p> NIST provides guidance on the use of keys of various strength for various time frames in special Publication SP 800-57 Part 1 [<cite><a class="bibref" href="#bib-SP800-57">SP800-57</a></cite>]. Implementers should consult this publication for guidance on acceptable key lengths for applications, however 2048-bit public keys are the minimum recommended key length and 3072-bit keys are recommended for securing information beyond 2030. SP800-57 Part 1 states that DSA 1024-bit key sizes should not be used except to verify and honor signatures created using older legacy systems. </p> <p>Since XML Signature 1.0 requires implementations to support DSA-based digital signatures, this XML Signature 1.1 revision allows verifiers to verify DSA signatures for DSA keys of 1024 bits in order to validate existing signatures. XML Signature 1.1 implementations <em class="rfc2119" title="MAY">MAY</em> but are <em class="rfc2119" title="NOT REQUIRED">NOT REQUIRED</em> to support DSA-based signature generation. Given the short key size and SP800-57 guidelines, DSA with 1024-bit prime moduli <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be used to create signatures. DSA with 1024-bit prime moduli <em class="rfc2119" title="MAY">MAY</em> be used to verify older legacy signatures, with an understanding of the associated risks. Important older signatures <em class="rfc2119" title="SHOULD">SHOULD</em> be re-signed with stronger signatures. </p> </section> <section id="sec-PKCS1"> <h4><span class="secno">6.4.2 </span>RSA (PKCS#1 v1.5)</h4> <dl> <dt>Identifier:</dt> <dd><a id="rsa-sha1" href="https://www.w3.org/2000/09/xmldsig#rsa-sha1">http://www.w3.org/2000/09/xmldsig#rsa-sha1</a></dd> <dd><a id="rsa-sha224" href="https://www.w3.org/2001/04/xmldsig-more#rsa-sha224">http://www.w3.org/2001/04/xmldsig-more#rsa-sha224</a></dd> <dd><a id="rsa-sha256" href="https://www.w3.org/2001/04/xmldsig-more#rsa-sha256">http://www.w3.org/2001/04/xmldsig-more#rsa-sha256</a></dd> <dd><a id="rsa-sha384" href="https://www.w3.org/2001/04/xmldsig-more#rsa-sha384">http://www.w3.org/2001/04/xmldsig-more#rsa-sha384</a></dd> <dd><a id="rsa-sha512" href="https://www.w3.org/2001/04/xmldsig-more#rsa-sha512">http://www.w3.org/2001/04/xmldsig-more#rsa-sha512</a></dd> </dl> <p>The expression "RSA algorithm" as used in this specification refers to the RSASSA-PKCS1-v1_5 algorithm described in <a href="http://www.ietf.org/rfc/rfc3447.txt">RFC 3447</a> [<cite><a class="bibref" href="#bib-PKCS1">PKCS1</a></cite>]. The RSA algorithm takes no explicit parameters. An example of an RSA SignatureMethod element is:</p> <div class="example"><div class="example-title"><span>Example 19</span></div><pre class="example highlight prettyprint"><code><span class="tag">&lt;SignatureMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#rsa-sha1"</span><span class="tag">/&gt;</span></code></pre></div> <p>The <code>SignatureValue</code> content for an RSA signature is the base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>] encoding of the octet string computed as per <a href="http://www.ietf.org/rfc/rfc3447.txt">RFC 3447</a> [<cite><a class="bibref" href="#bib-PKCS1">PKCS1</a></cite>], section 8.2.1: Signature generation for the RSASSA-PKCS1-v1_5 signature scheme]. Computation of the signature will require concatenation of the hash value and a constant string determined by RFC 3447. Signature computation and verification does not require implementation of an ASN.1 parser.</p> <!-- As specified in the EMSA-PKCS1-V1_5-ENCODE function <a href= "http://www.ietf.org/rfc/rfc3447.txt" >RFC 3447</a> [[!PKCS1]], section 9.2.1], the value input to the signature function MUST contain a pre-pended algorithm object identifier for the hash function, but the availability of an ASN.1 parser and recognition of OIDs is not required of a signature verifier. The PKCS#1 v1.5 representation appears as:</p> <pre class="example sh_xml"> CRYPT (PAD (ASN.1 (OID, DIGEST (data)))) </pre> <p>Note that the padded ASN.1 will be of the following form:</p> <pre class="example sh_xml"> 01 | FF* | 00 | prefix | hash </pre> <p>where "|" is concatenation, "01", "FF", and "00" are fixed octets of the corresponding hexadecimal value, "hash" is the SHA1 digest of the data, and "prefix" is the ASN.1 BER SHA1 algorithm designator prefix required in PKCS1 [RFC 3447], that is,</p> <pre class="example sh_xml"> hex 30 21 30 09 06 05 2B 0E 03 02 1A 05 00 04 14 </pre> <p>This prefix is included to make it easier to use standard cryptographic libraries. The FF octet MUST be repeated the maximum number of times such that the value of the quantity being CRYPTed is one octet shorter than the RSA modulus.</p> --> <p>The resulting base64 [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>] string is the value of the child text node of the SignatureValue element, e.g.</p> <div><div class="example"><div class="example-title"><span>Example 20</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;SignatureValue&gt;</span><span class="pln"> IWijxQjUrcXBYoCei4QxjWo9Kg8D3p9tlWoT4t0/gyTE96639In0FZFY2/rvP+/bMJ01EArmKZs R5VW3rwoPxw= </span><span class="tag">&lt;/SignatureValue&gt;</span></pre></div></div> <p>Note - A line break has been added to preserve printed page width.</p> <h4 id="security-considerations-regarding-rsa-key-sizes">Security considerations regarding RSA key sizes</h4> <p> NIST provides guidance on the use of keys of various strength for various time frames in special Publication SP 800-57 Part 1 [<cite><a class="bibref" href="#bib-SP800-57">SP800-57</a></cite>]. Implementers should consult this publication for guidance on acceptable key lengths for applications, however 2048-bit public keys are the minimum recommended key length and 3072-bit keys are recommended for securing information beyond 2030. </p><p> All conforming implementations of XML Signature 1.1 <em class="rfc2119" title="MUST">MUST</em> support RSA signature generation and verification with public keys at least 2048 bits in length. RSA public keys of 1024 bits or less <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be used to create new signatures but <em class="rfc2119" title="MAY">MAY</em> be used to verify signatures created by older legacy systems. XML Signature 1.1 implementations <em class="rfc2119" title="MUST">MUST</em> use at least 2048-bit keys for creating signatures, and <em class="rfc2119" title="SHOULD">SHOULD</em> use at least 3072-bit keys for signatures that will be verified beyond 2030. </p> </section> <section id="sec-ECDSA"> <h4><span class="secno">6.4.3 </span>ECDSA</h4> <dl> <dt>Identifiers:</dt> <dd><a id="ecdsa-sha1" href="https://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1</a></dd> <dd><a id="ecdsa-sha224" href="https://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224</a></dd> <dd><a id="ecdsa-sha256" href="https://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256</a></dd> <dd><a id="ecdsa-sha384" href="https://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384</a></dd> <dd><a id="ecdsa-sha512" href="https://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512">http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512</a></dd> </dl> <p>The ECDSA algorithm [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>] takes no explicit parameters. An example of a ECDSA <code>SignatureMethod </code>element is:</p> <div><div class="example"><div class="example-title"><span>Example 21</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;SignatureMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span></pre></div></div> <p>The output of the ECDSA algorithm consists of a pair of integers usually referred by the pair (r, s). The signature value consists of the base64 encoding of the concatenation of two octet-streams that respectively result from the octet-encoding of the values r and s in that order. Integer to octet-stream conversion must be done according to the I2OSP operation defined in the <a href="http://www.ietf.org/rfc/rfc3447.txt">RFC 3447</a> [<cite><a class="bibref" href="#bib-PKCS1">PKCS1</a></cite>] specification with the <code>l</code> parameter equal to the size of the base point order of the curve in bytes (e.g. 32 for the P-256 curve and 66 for the P-521 curve). </p> <p>This specification REQUIRES implementations to implement an algorithm that leads to the same results as ECDSA over the P-256 prime curve specified in Section D.2.3 of FIPS 186-3 [<cite><a class="bibref" href="#bib-FIPS-186-3">FIPS-186-3</a></cite>] (and using the SHA-256 hash algorithm), referred to as the ECDSAwithSHA256 signature algorithm [<cite><a class="bibref" href="#bib-ECC-ALGS">ECC-ALGS</a></cite>]. It is further <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> that implementations also implement algorithms that lead to the same results as ECDSA over the P-384 and P-521 prime curves; these curves are defined in Sections D.2.4 and D.2.5 of FIPS 186-3, respectively [<cite><a class="bibref" href="#bib-ECC-ALGS">ECC-ALGS</a></cite>]. </p> <div id="rfc6090note"> <p> <strong>Note:</strong> As described in IETF RFC 6090, the Elliptic Curve DSA (ECDSA) and KT-I signature methods are mathematically and functionally equivalent for fields of characteristic greater than three. See IETF RFC 6090 Section 7.2 [<cite><a class="bibref" href="#bib-ECC-ALGS">ECC-ALGS</a></cite>]. </p> </div> </section> </section> <section id="sec-c14nAlg"> <h3><span class="secno">6.5 </span>Canonicalization Algorithms</h3> <p>If canonicalization is performed over octets, the canonicalization algorithms take two implicit parameters: the content and its charset. The charset is derived according to the rules of the transport protocols and media types (e.g, [<cite><a class="bibref" href="#bib-XML-MEDIA-TYPES">XML-MEDIA-TYPES</a></cite>] defines the media types for XML). This information is necessary to correctly sign and verify documents and often requires careful server side configuration.</p> <p>Various canonicalization algorithms require conversion to [<cite><a class="bibref" href="#bib-UTF-8">UTF-8</a></cite>]. The algorithms below understand at least [<cite><a class="bibref" href="#bib-UTF-8">UTF-8</a></cite>] and [<cite><a class="bibref" href="#bib-UTF-16">UTF-16</a></cite>] as input encodings. We RECOMMEND that externally specified algorithms do the same. Knowledge of other encodings is <em class="rfc2119" title="OPTIONAL">OPTIONAL</em>.</p> <p>Various canonicalization algorithms transcode from a non-Unicode encoding to Unicode. The output of these algorithms will be in NFC [<cite><a class="bibref" href="#bib-NFC">NFC</a></cite>]. This is because the XML processor used to prepare the XPath data model input is required (by the Data Model) to use Normalization Form C when converting an XML document to the UCS character domain from any encoding that is not UCS-based. </p> <p>We RECOMMEND that externally specified canonicalization algorithms do the same. (Note, there can be ambiguities in converting existing charsets to Unicode, for an example see the XML Japanese Profile Note [<cite><a class="bibref" href="#bib-XML-Japanese">XML-Japanese</a></cite>].)</p> <p>This specification REQUIRES implementation of Canonical XML 1.0 [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>], Canonical XML 1.1 [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>]] and Exclusive XML Canonicalization [<cite><a class="bibref" href="#bib-XML-EXC-C14N">XML-EXC-C14N</a></cite>]. We RECOMMEND that applications that generate signatures choose Canonical XML 1.1 [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>] when inclusive canonicalization is desired.</p> <p><b>Note</b>: Canonical XML 1.0 [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] and Canonical XML 1.1 [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>] specify a standard serialization of XML that, when applied to a subdocument, includes the subdocument's ancestor context including all of the namespace declarations and some attributes in the 'xml:' namespace. However, some applications require a method which, to the extent practical, excludes unused ancestor context from a canonicalized subdocument. The Exclusive XML Canonicalization Recommendation [<cite><a class="bibref" href="#bib-XML-EXC-C14N">XML-EXC-C14N</a></cite>] may be used to address requirements resulting from scenarios where a subdocument is moved between contexts.</p> <section id="sec-Canonical"> <h4><span class="secno">6.5.1 </span>Canonical XML 1.0</h4> <dl> <dt>Identifier for <em class="rfc2119" title="REQUIRED">REQUIRED</em> Canonical XML 1.0 (omits comments):</dt> <dd><a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</a></dd> <dt>Identifier for Canonical XML 1.0 with Comments:</dt> <dd><a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments">http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</a></dd> <dt>Input:</dt><dd>octet-stream, node-set</dd> <dt>Output:</dt><dd>octet-stream</dd> </dl> <p>An example of an XML canonicalization element is:</p> <div class="example"><div class="example-title"><span>Example 22</span></div><pre class="example highlight prettyprint"><code><span class="tag">&lt;CanonicalizationMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"</span></code><span class="atv">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</span><code><span class="atv">"</span><span class="tag">/&gt;</span></code></pre></div> <p>The normative specification of Canonical XML1.0 is [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>]. The algorithm is capable of taking as input either an octet stream or an XPath node-set (or sufficiently functional alternative). The algorithm produces an octet stream as output. Canonical XML is easily parameterized (via an additional URI) to omit or retain comments.</p> </section> <section id="sec-Canonical11"> <h4><span class="secno">6.5.2 </span>Canonical XML 1.1</h4> <dl> <dt>Identifier for <em class="rfc2119" title="REQUIRED">REQUIRED</em> Canonical XML 1.1 (omits comments):</dt> <dd><a href="https://www.w3.org/2006/12/xml-c14n11">http://www.w3.org/2006/12/xml-c14n11</a></dd> <dt>Identifier for Canonical XML 1.1 with Comments:</dt> <dd><a href="https://www.w3.org/2006/12/xml-c14n11#WithComments">http://www.w3.org/2006/12/xml-c14n11#WithComments</a></dd> <dt>Input:</dt><dd>octet-stream, node-set</dd> <dt>Output:</dt><dd>octet-stream</dd> </dl> <p>The normative specification of Canonical XML 1.1 is [<cite><a class="bibref" href="#bib-XML-C14N11">XML-C14N11</a></cite>]. The algorithm is capable of taking as input either an octet stream or an XPath node-set (or sufficiently functional alternative). The algorithm produces an octet stream as output. Canonical XML 1.1 is easily parameterized (via an additional URI) to omit or retain comments.</p> </section> <section id="sec-ExcC14N10"> <h4><span class="secno">6.5.3 </span>Exclusive XML Canonicalization 1.0</h4> <dl> <dt>Identifier for <em class="rfc2119" title="REQUIRED">REQUIRED</em> Exclusive XML Canonicalization 1.0 (omits comments):</dt> <dd><a href="https://www.w3.org/2001/10/xml-exc-c14n#">http://www.w3.org/2001/10/xml-exc-c14n#</a></dd> <dt>Identifier for Exclusive XML Canonicalization 1.0 with Comments:</dt> <dd><a href="https://www.w3.org/2001/10/xml-exc-c14n#WithComments"> http://www.w3.org/2001/10/xml-exc-c14n#WithComments</a></dd> <dt>Input:</dt><dd>octet-stream, node-set</dd> <dt>Output:</dt><dd>octet-stream</dd> </dl> <p>The normative specification of Exclusive XML Canonicalization 1.0 is [XML-EXC-C14N]].</p> </section> </section> <section id="sec-TransformAlg"> <h3><span class="secno">6.6 </span><code>Transform</code> Algorithms</h3> <p>A <code>Transform</code> algorithm has a single implicit parameter: an octet stream from the <code>Reference</code> or the output of an earlier <code> Transform</code>.</p> <p>For implementation requirements, please see <a href="#sec-AlgID">Algorithm Identifiers and Implementation Requirements</a>. Application developers are strongly encouraged to support all transforms that are listed as <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> unless the application environment has resource constraints that would make such support impractical. Compliance with this recommendation will maximize application interoperability and libraries should be available to enable support of these transforms in applications without extensive development. </p> <section id="sec-Canonicalization"> <h4><span class="secno">6.6.1 </span>Canonicalization</h4> <p>Any canonicalization algorithm that can be used for <code>CanonicalizationMethod</code> (such as those in&nbsp; <a href="#sec-c14nAlg">Canonicalization Algorithms</a> (section 6.5)) can be used as a <code>Transform</code>.</p> </section> <section id="sec-Base-64"> <h4><span class="secno">6.6.2 </span>Base64</h4> <dl> <dt>Identifiers:</dt> <dd><a id="base64" href="https://www.w3.org/2000/09/xmldsig#base64">http://www.w3.org/2000/09/xmldsig#base64</a></dd> <dt>Input:</dt><dd>octet-stream, node-set</dd> <dt>Output:</dt><dd>octet-stream</dd> </dl> <p>The normative specification for base64 decoding transforms is [<cite><a class="bibref" href="#bib-RFC2045">RFC2045</a></cite>]. The base64 <code>Transform</code> element has no content. The input is decoded by the algorithms. This transform is useful if an application needs to sign the raw data associated with the encoded content of an element.</p> <p> This transform accepts either an octet-stream or a node-set as input. If an octet-string is given as input, then this octet-stream is processed directly. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression <code>self::text()</code>, then 2) sorting the nodeset by document order, then concatenating the string-value of each of the nodes into one long string. Thus, if an XML element is identified by a shortname XPointer in the <code>Reference</code> URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream.</p> </section> <section id="sec-XPath"> <h4><span class="secno">6.6.3 </span>XPath Filtering</h4> <dl> <dt>Identifier:</dt> <dd><a href="https://www.w3.org/TR/1999/REC-xpath-19991116">http://www.w3.org/TR/1999/REC-xpath-19991116</a></dd> <dt>Input:</dt><dd>octet-stream, node-set</dd> <dt>Output:</dt><dd>node-set</dd> </dl> <p>The normative specification for XPath expression evaluation is [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>]. The XPath expression to be evaluated appears as the character content of a transform parameter child element named <code>XPath</code>.</p> <p>The input required by this transform is an XPath node-set or an octet-stream. Note that if the actual input is an XPath node-set resulting from a null URI or shortname XPointer dereference, then comment nodes will have been omitted. If the actual input is an octet stream, then the application <em class="rfc2119" title="MUST">MUST</em> convert the octet stream to an XPath node-set suitable for use by Canonical XML with Comments. (A subsequent application of the <em class="rfc2119" title="REQUIRED">REQUIRED</em> Canonical XML algorithm would strip away these comments.) In other words, the input node-set should be equivalent to the one that would be created by the following process:</p> <ol> <li>Initialize an XPath evaluation context by setting the initial node equal to the input XML document's root node, and set the context position and size to 1.</li> <li>Evaluate the XPath expression <code>(//. | //@* | //namespace::*)</code></li> </ol> <p>The evaluation of this expression includes all of the document's nodes (including comments) in the node-set representing the octet stream.</p> <p>The transform output is always an XPath node-set. The XPath expression appearing in the <code>XPath</code> parameter is evaluated once for each node in the input node-set. The result is converted to a boolean. If the boolean is true, then the node is included in the output node-set. If the boolean is false, then the node is omitted from the output node-set.</p> <p><strong>Note:</strong> Even if the input node-set has had comments removed, the comment nodes still exist in the underlying parse tree and can separate text nodes. For example, the markup <code>&lt;e&gt;Hello, &lt;!-- comment --&gt;world!&lt;/e&gt;</code> contains two text nodes. Therefore, the expression <code>self::text()[string()="Hello, world!"]</code> would fail. Should this problem arise in the application, it can be solved by either canonicalizing the document before the XPath transform to physically remove the comments or by matching the node based on the parent element's string value (e.g. by using the expression <code>self::text()[string(parent::e)="Hello, world!"]</code>).</p> <p>The primary purpose of this transform is to ensure that only specifically defined changes to the input XML document are permitted after the signature is affixed. This is done by omitting precisely those nodes that are allowed to change once the signature is affixed, and including all other input nodes in the output. It is the responsibility of the XPath expression author to include all nodes whose change could affect the interpretation of the transform output in the application context.</p> <p>Note that the XML-Signature XPath Filter 2.0 Recommendation [<cite><a class="bibref" href="#bib-XMLDSIG-XPATH-FILTER2">XMLDSIG-XPATH-FILTER2</a></cite>] may be used for this purpose. That recommendation defines an XPath transform that permits the easy specification of subtree selection and omission that can be efficiently implemented.</p> <p>An important scenario would be a document requiring two enveloped signatures. Each signature must omit itself from its own digest calculations, but it is also necessary to exclude the second signature element from the digest calculations of the first signature so that adding the second signature does not break the first signature.</p> <p>The XPath transform establishes the following evaluation context for each node of the input node-set:</p> <ul> <li>A <strong>context node</strong> equal to a node of the input node-set.</li> <li>A <strong>context position</strong>, initialized to 1.</li> <li>A <strong>context size</strong>, initialized to 1.</li> <li>A <strong>library of functions</strong> equal to the function set defined in [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] augmented with a function named <strong><a href="#function-here">here</a></strong> to be treated as if part of the library (and not namespace prefixed).</li> <li>A set of variable bindings. No means for initializing these is defined. Thus, the set of variable bindings used when evaluating the XPath expression is empty, and use of a variable reference in the XPath expression results in an error.</li> <li>The set of namespace declarations in scope for the XPath expression.</li> </ul> <p>As a result of the context node setting, the XPath expressions appearing in this transform will be quite similar to those used in used in [<cite><a class="bibref" href="#bib-XSLT">XSLT</a></cite>], except that the size and position are always 1 to reflect the fact that the transform is automatically visiting every node (in XSLT, one recursively calls the command <code>apply-templates</code> to visit the nodes of the input tree).</p> <p><strong>The function <code>here()</code> is defined as follows:</strong></p> <p><a id="function-here"><strong>Function:</strong> <em>node-set</em> <strong>here</strong>()</a></p> <p>The <strong><a href="#function-here">here</a></strong> function returns a node-set containing the attribute or processing instruction node or the parent element of the text node that directly bears the XPath expression.&nbsp; This expression results in an error if the containing XPath expression does not appear in the same XML document against which the XPath expression is being evaluated.</p> <p>As an example, consider creating an enveloped signature (a <code>Signature</code> element that is a descendant of an element being signed). Although the signed content should not be changed after signing, the elements within the <code>Signature</code> element are changing (e.g. the digest value must be put inside the <code> DigestValue</code> and the <code>SignatureValue</code> must be subsequently calculated). One way to prevent these changes from invalidating the digest value in <code>DigestValue</code> is to add an XPath <code>Transform</code> that omits all <code>Signature</code> elements and their descendants. For example,</p> <div><div class="example"><div class="example-title"><span>Example 23</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;Document&gt;</span><span class="pln"> ... </span><span class="tag">&lt;Signature</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;SignedInfo&gt;</span><span class="pln"> ... </span><span class="tag">&lt;Reference</span><span class="pln"> </span><span class="atn">URI</span><span class="pun">=</span><span class="atv">""</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;Transforms&gt;</span><span class="pln"> </span><span class="tag">&lt;Transform</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/TR/1999/REC-xpath-19991116"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;XPath</span><span class="pln"> </span><span class="atn">xmlns:dsig</span><span class="pun">=</span><span class="atv">"&amp;dsig;"</span><span class="tag">&gt;</span><span class="pln"> not(ancestor-or-self::dsig:Signature) </span><span class="tag">&lt;/XPath&gt;</span><span class="pln"> </span><span class="tag">&lt;/Transform&gt;</span><span class="pln"> </span><span class="tag">&lt;/Transforms&gt;</span><span class="pln"> </span><span class="tag">&lt;DigestMethod</span><span class="pln"> </span><span class="atn">Algorithm</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#sha1"</span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;DigestValue&gt;&lt;/DigestValue&gt;</span><span class="pln"> </span><span class="tag">&lt;/Reference&gt;</span><span class="pln"> </span><span class="tag">&lt;/SignedInfo&gt;</span><span class="pln"> </span><span class="tag">&lt;SignatureValue&gt;&lt;/SignatureValue&gt;</span><span class="pln"> </span><span class="tag">&lt;/Signature&gt;</span><span class="pln"> ... </span><span class="tag">&lt;/Document&gt;</span></pre></div></div> <p>Due to the null <code>Reference</code> URI in this example, the XPath transform input node-set contains all nodes in the entire parse tree starting at the root node (except the comment nodes). For each node in this node-set, the node is included in the output node-set except if the node or one of its ancestors has a tag of <code>Signature</code> that is in the namespace given by the replacement text for the entity <code>&amp;dsig;</code>.</p> <p>A more elegant solution uses the <strong><a href="#function-here">here</a></strong> function to omit only the <code> Signature</code> containing the XPath Transform, thus allowing enveloped signatures to sign other signatures. In the example above, use the <code>XPath</code> element:</p> <div class="example"><div class="example-title"><span>Example 24</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;XPath</span><span class="pln"> </span><span class="atn">xmlns:dsig</span><span class="pun">=</span><span class="atv">"&amp;dsig;"</span><span class="tag">&gt;</span><span class="pln"> count(ancestor-or-self::dsig:Signature | here()/ancestor::dsig:Signature[1]) &gt; count(ancestor-or-self::dsig:Signature)</span><span class="tag">&lt;/XPath&gt;</span></pre></div> <p>Since the XPath equality operator converts node sets to string values before comparison, we must instead use the XPath union operator (|). For each node of the document, the predicate expression is true if and only if the node-set containing the node and its <code>Signature</code> element ancestors does not include the enveloped <code>Signature</code> element containing the XPath expression (the union does not produce a larger set if the enveloped <code> Signature</code> element is in the node-set given by <code> ancestor-or-self::Signature</code>).</p> </section> <section id="sec-EnvelopedSignature"> <h4><span class="secno">6.6.4 </span>Enveloped Signature Transform</h4> <dl> <dt>Identifier:</dt> <dd><a href="https://www.w3.org/2000/09/xmldsig#enveloped-signature" id="enveloped-signature">http://www.w3.org/2000/09/xmldsig#enveloped-signature</a></dd> <dt>Input:</dt><dd>node-set</dd> <dt>Output:</dt><dd>node-set</dd> </dl> <p>An enveloped signature transform <strong><em>T</em></strong> removes the whole <code>Signature</code> element containing <strong><em>T</em></strong> from the digest calculation of the <code>Reference</code> element containing <strong><em>T</em></strong>. The entire string of characters used by an XML processor to match the <code>Signature</code> with the XML production <code> element</code> is removed. The output of the transform is equivalent to the output that would result from replacing <strong><em>T</em></strong> with an XPath transform containing the following <code>XPath</code> parameter element:</p> <div class="example"><div class="example-title"><span>Example 25</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;XPath</span><span class="pln"> </span><span class="atn">xmlns:dsig</span><span class="pun">=</span><span class="atv">"&amp;dsig;"</span><span class="tag">&gt;</span><span class="pln"> count(ancestor-or-self::dsig:Signature | here()/ancestor::dsig:Signature[1]) &gt; count(ancestor-or-self::dsig:Signature)</span><span class="tag">&lt;/XPath&gt;</span></pre></div> <p>The input and output requirements of this transform are identical to those of the XPath transform, but may only be applied to a node-set from its parent XML document. Note that it is not necessary to use an XPath expression evaluator to create this transform. However, this transform <em class="rfc2119" title="MUST">MUST</em> produce output in exactly the same manner as the XPath transform parameterized by the XPath expression above.</p> </section> <section id="sec-XSLT"> <h4><span class="secno">6.6.5 </span>XSLT Transform</h4> <dl> <dt>Identifier:</dt> <dd><a href="https://www.w3.org/TR/1999/REC-xslt-19991116">http://www.w3.org/TR/1999/REC-xslt-19991116</a></dd> <dt>Input:</dt> <dd>octet-stream</dd> <dt>Output:</dt> <dd>octet-stream</dd> </dl> <p>The normative specification for XSL Transformations is [<cite><a class="bibref" href="#bib-XSLT">XSLT</a></cite>]. Specification of a namespace-qualified stylesheet element, which <em class="rfc2119" title="MUST">MUST</em> be the sole child of the <code>Transform</code> element, indicates that the specified style sheet should be used. Whether this instantiates in-line processing of local XSLT declarations within the resource is determined by the XSLT processing model; the ordered application of multiple stylesheet may require multiple <code>Transforms</code>. No special provision is made for the identification of a remote stylesheet at a given URI because it can be communicated via an <a href="https://www.w3.org/TR/1999/REC-xslt-19991116#section-Combining-Stylesheets"><code>xsl:include</code></a> or <a href="https://www.w3.org/TR/1999/REC-xslt-19991116#section-Combining-Stylesheets"><code>xsl:import</code></a> within the <code>stylesheet</code> child of the <code>Transform</code>.</p> <p>This transform requires an octet stream as input.</p> <!-- <p>If the actual input is an XPath node-set, then the signature application should attempt to convert it to octets (apply <a href= "#sec-Canonical" >Canonical XML</a>]) as described in <a href="#sec-ReferenceProcessingModel" >the Reference Processing Model</a> (section 4.3.3.2).</p> --> <p>The output of this transform is an octet stream. The processing rules for the XSL style sheet [<cite><a class="bibref" href="#bib-XSL10">XSL10</a></cite>] or transform element are stated in the XSLT specification [<cite><a class="bibref" href="#bib-XSLT">XSLT</a></cite>].</p> <p>We RECOMMEND that XSLT transform authors use an output method of <code>xml</code> for XML and HTML. As XSLT implementations do not produce consistent serializations of their output, we further RECOMMEND inserting a transform after the XSLT transform to canonicalize the output. These steps will help to ensure interoperability of the resulting signatures among applications that support the XSLT transform. Note that if the output is actually HTML, then the result of these steps is logically equivalent [<cite><a class="bibref" href="#bib-XHTML10">XHTML10</a></cite>].</p> </section> </section> </section> <section id="sec-XML-Canonicalization"> <!--OddPage--><h2><span class="secno">7. </span>XML Canonicalization and Syntax Constraint Considerations</h2> <p>Digital signatures only work if the verification calculations are performed on exactly the same bits as the signing calculations. If the surface representation of the signed data can change between signing and verification, then some way to standardize the changeable aspect must be used before signing and verification. For example, even for simple ASCII text there are at least three widely used line ending sequences. If it is possible for signed text to be modified from one line ending convention to another between the time of signing and signature verification, then the line endings need to be canonicalized to a standard form before signing and verification or the signatures will break.</p> <p>XML is subject to surface representation changes and to processing which discards some surface information. For this reason, XML digital signatures have a provision for indicating canonicalization methods in the signature so that a verifier can use the same canonicalization as the signer.</p> <p>Throughout this specification we distinguish between the canonicalization of a <code>Signature</code> element and other signed XML data objects. It is possible for an isolated XML document to be treated as if it were binary data so that no changes can occur. In that case, the digest of the document will not change and it need not be canonicalized if it is signed and verified as such. However, XML that is read and processed using standard XML parsing and processing techniques is frequently changed such that some of its surface representation information is lost or modified. In particular, this will occur in many cases for the <code>Signature</code> and enclosed <code>SignedInfo</code> elements since they, and possibly an encompassing XML document, will be processed as XML.</p> <p>Similarly, these considerations apply to <code>Manifest</code>, <code>Object</code>, and <code>SignatureProperties</code> elements if those elements have been digested, their <code>DigestValue</code> is to be checked, and they are being processed as XML.</p> <p>The kinds of changes in XML that may need to be canonicalized can be divided into four categories. There are those related to the basic [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>], as described in 7.1 below. There are those related to [<cite><a class="bibref" href="#bib-DOM-LEVEL-1">DOM-LEVEL-1</a></cite>], [<cite><a class="bibref" href="#bib-SAX">SAX</a></cite>], or similar processing as described in 7.2 below. Third, there is the possibility of coded character set conversion, such as between UTF-8 and UTF-16, both of which all&nbsp; [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>] compliant processors are required to support, which is described in the paragraph immediately below. And, fourth, there are changes that related to namespace declaration and XML namespace attribute context as described in 7.3 below.</p> <p>Any canonicalization algorithm should yield output in a specific fixed coded character set. All canonicalization <a href="#sec-c14nAlg">algorithms</a> identified in this document use UTF-8 (without a byte order mark (BOM)) and do not provide character normalization. We RECOMMEND that signature applications create XML content (<code>Signature</code> elements and their descendants/content) in Normalization Form C [<cite><a class="bibref" href="#bib-NFC">NFC</a></cite>] and check that any XML being consumed is in that form as well; (if not, signatures may consequently fail to validate). Additionally, none of these algorithms provide data type normalization. Applications that normalize data types in varying formats (e.g., (true, false) or (1,0)) may not be able to validate each other's signatures.</p> <section id="sec-XML-1"> <h3><span class="secno">7.1 </span>XML 1.0 Syntax Constraints, and Canonicalization</h3> <p>XML 1.0 [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>]] defines an interface where a conformant application reading XML is given certain information from that XML and not other information. In particular,</p> <ol> <li>line endings are normalized to the single character #xA by dropping #xD characters if they are immediately followed by a #xA and replacing them with #xA in all other cases,</li> <li>missing attributes declared to have default values are provided to the application as if present with the default value,&nbsp;</li> <li>character references are replaced with the corresponding character,</li> <li>entity references are replaced with the corresponding declared entity,</li> <li>attribute values are normalized by <ol> <li>replacing character and entity references as above,</li> <li>replacing occurrences of #x9, #xA, and #xD with #x20 (space) except that the sequence #xD#xA is replaced by a single space, and</li> <li>if the attribute is not declared to be CDATA, stripping all leading and trailing spaces and replacing all interior runs of spaces with a single space.</li> </ol> </li> </ol> <p>Note that items (2), (4), and (5.3) depend on the presence of a schema, DTD or similar declarations. The <code>Signature</code> element type is <a href="https://www.w3.org/TR/2000/WD-xmlschema-1-20000407/#cvc-elt-lax">laxly schema valid</a> [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>][<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>], consequently external XML or even XML within the same document as the signature may be (only) well-formed or from another namespace (where permitted by the signature schema); the noted items may not be present. Thus, a signature with such content will only be verifiable by other signature applications if the following syntax constraints are observed when generating any signed material including the <code>SignedInfo</code> element:</p> <ol> <li>attributes having default values be explicitly present,</li> <li>all entity references (except "amp", "lt", "gt", "apos", "quot", and other character entities not representable in the encoding chosen) be expanded,</li> <li>attribute value white space be normalized</li> </ol> </section> <section id="sec-DOM-SAX"> <h3><span class="secno">7.2 </span>DOM/SAX Processing and Canonicalization</h3> <p>In addition to the canonicalization and syntax constraints discussed above, many XML applications use the Document Object Model [<cite><a class="bibref" href="#bib-DOM-LEVEL-1">DOM-LEVEL-1</a></cite>] or the Simple API for XML&nbsp; [<cite><a class="bibref" href="#bib-SAX">SAX</a></cite>]. DOM maps XML into a tree structure of nodes and typically assumes it will be used on an entire document with subsequent processing being done on this tree. SAX converts XML into a series of events such as a start tag, content, etc. In either case, many surface characteristics such as the ordering of attributes and insignificant white space within start/end tags is lost. In addition, namespace declarations are mapped over the nodes to which they apply, losing the namespace prefixes in the source text and, in most cases, losing where namespace declarations appeared in the original instance.</p> <p>If an XML Signature is to be produced or verified on a system using the DOM or SAX processing, a canonical method is needed to serialize the relevant part of a DOM tree or sequence of SAX events. XML canonicalization specifications, such as [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>], are based only on information which is preserved by DOM and SAX. For an XML Signature to be verifiable by an implementation using DOM or SAX, not only must the XML 1.0 syntax constraints given in the <a href="#sec-XML-1" class="sectionRef sec-ref">section 7.1 XML 1.0 Syntax Constraints, and Canonicalization</a> be followed but an appropriate XML canonicalization <em class="rfc2119" title="MUST">MUST</em> be specified so that the verifier can re-serialize DOM/SAX mediated input into the same octet stream that was signed.</p> </section> <section id="sec-NamespaceContext"> <h3><span class="secno">7.3 </span>Namespace Context and Portable Signatures</h3> <p>In [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] and consequently the Canonical XML data model an element has namespace nodes that correspond to those declarations within the element and its ancestors:</p> <blockquote> <p>"<strong>Note:</strong> An element <strong><em>E</em></strong> has namespace nodes that represent its namespace declarations <em>as well as</em> any namespace declarations made by its ancestors that have not been overridden in <strong><em>E</em></strong>'s declarations, the default namespace if it is non-empty, and the declaration of the prefix <code>xml</code>." [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>]</p> </blockquote> <p>When serializing a <code>Signature</code> element or signed XML data that's the child of other elements using these data models, that <code>Signature</code> element and its children may have in-scope namespaces inherited from its ancestral context. In addition, the Canonical XML and Canonical XML with Comments algorithms define special treatment for attributes in the XML namespace, which can cause them to be part of the canonicalized XML even if they were outside of the document subset. Simple inheritable attributes (i.e. attributes that have a value that requires at most a simple redeclaration such as <code>xml:lang</code> and <code>xml:space</code>) are inherited from nearest ancestor in which they are declared to the apex node of canonicalized XML unless they are already declared at that node. This may frustrate the intent of the signer to create a signature in one context which remains valid in another. For example, given a signature which is a child of <code>B</code> and a grandchild of <code>A</code>:</p> <div><div class="example"><div class="example-title"><span>Example 26</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;A</span><span class="pln"> </span><span class="atn">xmlns:n1</span><span class="pun">=</span><span class="atv">"http://foo.example"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;B</span><span class="pln"> </span><span class="atn">xmlns:n2</span><span class="pun">=</span><span class="atv">"http://bar.example"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;Signature</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="tag">&gt;</span><span class="pln"> ... </span><span class="tag">&lt;Reference</span><span class="pln"> </span><span class="atn">URI</span><span class="pun">=</span><span class="atv">"#signme"</span><span class="tag">/&gt;</span><span class="pln"> ... </span><span class="tag">&lt;/Signature&gt;</span><span class="pln"> </span><span class="tag">&lt;C</span><span class="pln"> </span><span class="atn">ID</span><span class="pun">=</span><span class="atv">"signme"</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://baz.example"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/B&gt;</span><span class="pln"> </span><span class="tag">&lt;/A&gt;</span></pre></div></div> <p>when either the element <code>B</code> or the signed element <code>C</code> is moved into a [<cite><a class="bibref" href="#bib-SOAP12-PART1">SOAP12-PART1</a></cite>] envelope for transport:</p> <div><div class="example"><div class="example-title"><span>Example 27</span></div><pre class="example highlight prettyprint"><span class="tag">&lt;SOAP:Envelope</span><span class="pln"> </span><span class="atn">xmlns:SOAP</span><span class="pun">=</span><span class="atv">"http://schemas.xmlsoap.org/soap/envelope/"</span><span class="tag">&gt;</span><span class="pln"> ... </span><span class="tag">&lt;SOAP:Body&gt;</span><span class="pln"> </span><span class="tag">&lt;B</span><span class="pln"> </span><span class="atn">xmlns:n2</span><span class="pun">=</span><span class="atv">"http://bar.example"</span><span class="tag">&gt;</span><span class="pln"> </span><span class="tag">&lt;Signature</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://www.w3.org/2000/09/xmldsig#"</span><span class="tag">&gt;</span><span class="pln"> ... </span><span class="tag">&lt;/Signature&gt;</span><span class="pln"> </span><span class="tag">&lt;C</span><span class="pln"> </span><span class="atn">ID</span><span class="pun">=</span><span class="atv">"signme"</span><span class="pln"> </span><span class="atn">xmlns</span><span class="pun">=</span><span class="atv">"http://baz.example"</span><span class="pln"> </span><span class="tag">/&gt;</span><span class="pln"> </span><span class="tag">&lt;/B&gt;</span><span class="pln"> </span><span class="tag">&lt;/SOAP:Body&gt;</span><span class="pln"> </span><span class="tag">&lt;/SOAP:Envelope&gt;</span></pre></div></div> <p>The canonical form of the signature in this context will contain new namespace declarations from the <code>SOAP:Envelope</code> context, invalidating the signature. Also, the canonical form will lack namespace declarations it may have originally had from element <code>A</code>'s context, also invalidating the signature. To avoid these problems, the application may:</p> <ol> <li>Rely upon the enveloping application to properly divorce its body (the signature payload) from the context (the envelope) before the signature is validated. Or,</li> <li>Use a canonicalization method that "repels/excludes" instead of "attracts" ancestor context. [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] purposefully attracts such context.</li> </ol> </section> </section> <section id="sec-Security"> <!--OddPage--><h2><span class="secno">8. </span>Security Considerations</h2> <p>The XML Signature specification provides a very flexible digital signature mechanism. Implementers must give consideration to their application threat models and to the following factors. For additional security considerations in implementation and deployment of this specification, see [<cite><a class="bibref" href="#bib-XMLDSIG-BESTPRACTICES">XMLDSIG-BESTPRACTICES</a></cite>].</p> <section id="sec-Security-Transforms"> <h3><span class="secno">8.1 </span>Transforms</h3> <p>A requirement of this specification is to permit signatures to "apply to&nbsp;a part or totality of a XML document." (See [<cite><a class="bibref" href="#bib-XMLDSIG-REQUIREMENTS">XMLDSIG-REQUIREMENTS</a></cite>], section 3.1.3].) The <code>Transforms</code> mechanism meets this requirement by permitting one to sign data derived from processing the content of the identified resource. For instance, applications that wish to sign a form, but permit users to enter limited field data without invalidating a previous signature on the form might use [<cite><a class="bibref" href="#bib-XPATH">XPATH</a></cite>] to exclude those portions the user needs to change. <code>Transforms</code> may be arbitrarily specified and may include encoding transforms, canonicalization instructions or even XSLT transformations. Three cautions are raised with respect to this feature in the following sections.</p> <p>Note, <a class="link-def" href="#def-ValidationCore">core validation</a> behavior does not confirm that the signed data was obtained by applying each step of the indicated transforms. (Though it does check that the digest of the resulting content matches that specified in the signature.)&nbsp; For example, some applications may be satisfied with verifying an XML signature over a cached copy of already transformed data. Other applications might require that content be freshly dereferenced and transformed.</p> <section id="sec-Secure"> <h4><span class="secno">8.1.1 </span>Only What is Signed is Secure</h4> <p>First, obviously, signatures over a transformed document do not secure any information discarded by transforms: only what is signed is secure.</p> <p>Note that the use of Canonical&nbsp; XML [<cite><a class="bibref" href="#bib-XML-C14N">XML-C14N</a></cite>] ensures that all internal entities and XML namespaces are expanded within the content being signed. All entities are replaced with their definitions and the canonical form explicitly represents the namespace that an element would otherwise inherit. Applications that do not canonicalize XML content (especially the <code>SignedInfo</code> element) <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> use internal entities and <em class="rfc2119" title="SHOULD">SHOULD</em> represent the namespace explicitly within the content being signed since they can not rely upon canonicalization to do this for them. Also, users concerned with the integrity of the element type definitions associated with the XML instance being signed may wish to sign those definitions as well (i.e., the schema, DTD, or natural language description associated with the namespace/identifier).</p> <p>Second, an envelope containing signed information is not secured by the signature. For instance, when an encrypted envelope contains a signature, the signature does not protect the authenticity or integrity of unsigned envelope headers nor its ciphertext form, it only secures the plaintext actually signed.</p> </section> <section id="sec-Seen"> <h4><span class="secno">8.1.2 </span>Only What is "Seen" Should be Signed</h4> <p>Additionally, the signature secures any information introduced by the transform: only what is "seen" (that which is represented to the user via visual, auditory or other media) should be signed. If signing is intended to convey the judgment or consent of a user (an automated mechanism or person), then it is normally necessary to secure as exactly as practical the information that was presented to that user. Note that this can be accomplished by literally signing what was presented, such as the screen images shown a user. However, this may result in data which is difficult for subsequent software to manipulate. Instead, one can sign the data along with whatever filters, style sheets, client profile or other information that affects its presentation.</p> </section> <section id="sec-See"> <h4><span class="secno">8.1.3 </span>"See" What is Signed</h4> <p>Just as a user should only sign what he or she "sees," persons and automated mechanism that trust the validity of a transformed document on the basis of a valid signature should operate over the data that was transformed (including canonicalization) and signed, not the original pre-transformed data. This recommendation applies to transforms specified within the signature as well as those included as part of the document itself. For instance, if an XML document includes an <a href="https://www.w3.org/TR/xslt#section-Creating-Processing-Instructions">embedded style sheet</a> [<cite><a class="bibref" href="#bib-XSLT">XSLT</a></cite>] it is the transformed document that should be represented to the user and signed. To meet this recommendation where a document references an external style sheet, the content of that external resource should also be signed as via a signature <code>Reference</code> otherwise the content of that external content might change which alters the resulting document without invalidating the signature.</p> <p>Some applications might operate over the original or intermediary data but should be extremely careful about potential weaknesses introduced between the original and transformed data. This is a trust decision about the character and meaning of the transforms that an application needs to make with caution. Consider a canonicalization algorithm that normalizes character case (lower to upper) or character composition ('e and accent' to 'accented-e'). An adversary could introduce changes that are normalized and consequently inconsequential to signature validity but material to a DOM processor. For instance, by changing the case of a character one might influence the result of an XPath selection. A serious risk is introduced if that change is normalized for signature validation but the processor operates over the original data and returns a different result than intended.</p> <p>As a result:</p> <ul> <li>All documents operated upon and generated by signature applications <em class="rfc2119" title="MUST">MUST</em> be in [<cite><a class="bibref" href="#bib-NFC">NFC</a></cite>] (otherwise intermediate processors might unintentionally break the signature)</li> <li>Encoding normalizations <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> be done as part of a signature transform, or (to state it another way) if normalization does occur, the application <em class="rfc2119" title="SHOULD">SHOULD</em> always "see" (operate over) the normalized form.</li> </ul> </section> </section> <section id="sec-Check"> <h3><span class="secno">8.2 </span>Check the Security Model</h3> <p>This specification uses public key signatures and keyed hash authentication codes. These have substantially different security models. Furthermore, it permits user specified algorithms which may have other models.</p> <p>With public key signatures, any number of parties can hold the public key and verify signatures while only the parties with the private key can create signatures. The number of holders of the private key should be minimized and preferably be one. Confidence by verifiers in the public key they are using and its binding to the entity or capabilities represented by the corresponding private key is an important issue, usually addressed by certificate or online authority systems.</p> <p>Keyed hash authentication codes, based on secret keys, are typically much more efficient in terms of the computational effort required but have the characteristic that all verifiers need to have possession of the same key as the signer. Thus any verifier can forge signatures.</p> <p>This specification permits user provided signature algorithms and keying information designators. Such user provided algorithms may have different security models. For example, methods involving biometrics usually depend on a physical characteristic of the authorized user that can not be changed the way public or secret keys can be and may have other security model differences.</p> </section> <section id="sec-KeyLength"> <h3><span class="secno">8.3 </span>Algorithms, Key Lengths, Certificates, Etc.</h3> <p>The strength of a particular signature depends on all links in the security chain. This includes the signature and digest algorithms used, the strength of the key generation [<cite><a class="bibref" href="#bib-RANDOM">RANDOM</a></cite>] and the size of the key, the security of key and certificate authentication and distribution mechanisms, certificate chain validation policy, protection of cryptographic processing from hostile observation and tampering, etc.</p> <p>Care must be exercised by applications in executing the various algorithms that may be specified in an XML signature and in the processing of any "executable content" that might be provided to such algorithms as parameters, such as XSLT transforms. The algorithms specified in this document will usually be implemented via a trusted library but even there perverse parameters might cause unacceptable processing or memory demand. Even more care may be warranted with application defined algorithms.</p> <p>The security of an overall system will also depend on the security and integrity of its operating procedures, its personnel, and on the administrative enforcement of those procedures. All the factors listed in this section are important to the overall security of a system; however, most are beyond the scope of this specification.</p> </section> <section id="sec-Errors"> <h3><span class="secno">8.4 </span>Error Messages</h3> <p> Implementations <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> provide detailed error responses related to security algorithm processing. Error messages should be limited to a generic error message to avoid providing information to a potential attacker related to the specifics of the algorithm implementation. For example, if an error occurs in signature verification processing the error response should be a generic message providing no specifics on the details of the processing error. </p> </section> </section> <section id="sec-Schema"> <!--OddPage--><h2><span class="secno">9. </span>Schema</h2> <section id="sec-xsdSchema"> <h3><span class="secno">9.1 </span>XSD Schema</h3> <dl> <dt>XML Signature Core Schema Instance</dt> <dd><a href="https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/xmldsig-core-schema.xsd">xmldsig-core-schema.xsd</a></dd> <dd>Valid XML schema instance based on [<cite><a class="bibref" href="#bib-XMLSCHEMA-1">XMLSCHEMA-1</a></cite>][<cite><a class="bibref" href="#bib-XMLSCHEMA-2">XMLSCHEMA-2</a></cite>].</dd> <dt>XML Signature 1.1 Schema Instance</dt> <dd><a href="xmldsig11-schema.xsd">xmldsig11-schema.xsd</a></dd> <dd>This schema document defines the additional elements defined in this version of the XML Signature specification.</dd> <dt>XML Signature 1.1 Schema Driver</dt> <dd><a href="xmldsig1-schema.xsd">xmldsig1-schema.xsd</a></dd> <dd>This schema instance binds together the XML Signature Core Schema Instance and the XML Signature 1.1 Schema Instance</dd> </dl> </section> <section id="sec-rngSchema" class="informative"> <h3><span class="secno">9.2 </span>RNG Schema</h3><p><em>This section is non-normative.</em></p> Non-normative RELAX NG schema [<cite><a class="bibref" href="#bib-RELAXNG-SCHEMA">RELAXNG-SCHEMA</a></cite>] information is available in a separate document [<cite><a class="bibref" href="#bib-XMLSEC-RELAXNG">XMLSEC-RELAXNG</a></cite>]. </section> </section> <section id="sec-Definitions"> <!--OddPage--><h2><span class="secno">10. </span>Definitions</h2> <dl> <dt><a id="def-AuthenticationCode">Authentication Code</a> (<a id="def-ProtectedChecksum">Protected Checksum</a>)</dt> <dd>A value generated from the application of a shared key to a message via a cryptographic algorithm such that it has the properties of <a href="#def-AuthenticationMessage" class="link-def">message authentication</a> (and <a href="#def-Integrity" class="link-def">integrity</a>) but not <a href="#def-AuthenticationSigner" class="link-def">signer authentication</a>. Equivalent to <em>protected checksum</em>, "A checksum that is computed for a data object by means that protect against active attacks that would attempt to change the checksum to make it match changes made to the data object."&nbsp; [<cite><a class="bibref" href="#bib-RFC4949">RFC4949</a></cite>]</dd> <dt><a id="def-AuthenticationMessage">Authentication, Message</a></dt> <dd>The property, given an <a href="#def-AuthenticationCode" class="link-def">authentication code</a>/<a href="#def-ProtectedChecksum" class="link-def">protected checksum</a>, that tampering with both the data and checksum, so as to introduce changes while seemingly preserving <a href="#def-Integrity" class="link-def">integrity</a>, are still detected. "A signature should identify what is signed, making it impracticable to falsify or alter either the signed matter or the signature without detection." [<cite><a class="bibref" href="#bib-ABA-DSIG-GUIDELINES">ABA-DSIG-GUIDELINES</a></cite>].</dd> <dt><a id="def-AuthenticationSigner">Authentication, Signer</a></dt> <dd>The property that the identity of the signer is as claimed. "A signature should indicate who signed a document, message or record, and should be difficult for another person to produce without authorization." [<cite><a class="bibref" href="#bib-ABA-DSIG-GUIDELINES">ABA-DSIG-GUIDELINES</a></cite>] Note, signer authentication is an application decision (e.g., does the signing key actually correspond to a specific identity) that is supported by, but out of scope, of this specification.</dd> <dt><a id="def-Checksum">Checksum</a></dt> <dd>"A value that (a) is computed by a function that is dependent on the contents of a data object and (b) is stored or transmitted together with the object, for the purpose of detecting changes in the data."&nbsp; [<cite><a class="bibref" href="#bib-RFC4949">RFC4949</a></cite>]</dd> <dt><a id="def-Core">Core</a></dt> <dd>The syntax and processing defined by this specification, including <a href="#def-ValidationCore" class="link-def">core validation</a>. We use this term to distinguish other markup, processing, and applications semantics from our own.</dd> <dt><a id="def-DataObject">Data Object</a> (Content/Document)</dt> <dd>The actual binary/octet data being operated on (transformed, digested, or signed) by an application -- frequently an <a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7">HTTP entity</a> [<cite><a class="bibref" href="#bib-HTTP11">HTTP11</a></cite>]. Note that the proper noun <code>Object</code> designates a specific XML element. Occasionally we refer to a data object as a <em>document</em> or as a <em><a href="#def-Resource" class="link-def">resource</a>'s content</em>. The term <em>element content</em> is used to describe the data between XML start and end tags [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>]. The term <em>XML document</em> is used to describe data objects which conform to the XML specification [<cite><a class="bibref" href="#bib-XML10">XML10</a></cite>].</dd> <dt><a id="def-Integrity">Integrity</a></dt> <dd>"The property that data has not been changed, destroyed, or lost in an unauthorized or accidental manner." [<cite><a class="bibref" href="#bib-RFC4949">RFC4949</a></cite>] A simple <a href="#def-Checksum" class="link-def">checksum</a> can provide integrity from incidental changes in the data; <a href="#def-AuthenticationMessage" class="link-def">message authentication</a> is similar but also protects against an active attack to alter the data whereby a change in the checksum is introduced so as to match the change in the data.&nbsp;</dd> <dt><a id="def-Object">Object</a></dt> <dd>An XML Signature element wherein arbitrary (non-<a href="#def-Core" class="link-def">core</a>) data may be placed. An <code> Object</code> element is merely one type of digital data (or document) that can be signed via a <code>Reference</code>.</dd> <dt><a id="def-Resource">Resource</a></dt> <dd>"A resource can be anything that has identity. Familiar examples include an electronic document, an image, a service (e.g., 'today's weather report for Los Angeles'), and a collection of other resources.... The resource is the conceptual mapping to an entity or set of entities, not necessarily the entity which corresponds to that mapping at any particular instance in time. Thus, a resource can remain constant even when its content---the entities to which it currently corresponds---changes over time, provided that the conceptual mapping is not changed in the process." [<cite><a class="bibref" href="#bib-URI">URI</a></cite>] In order to avoid a collision of the term <em> entity</em> within the URI and XML specifications, we use the term <em>data object</em>, <em>content</em> or <em>document</em> to refer to the actual bits/octets being operated upon.</dd> <dt><a id="def-Signature">Signature</a></dt> <dd>Formally speaking, a value generated from the application of a private key to a message via a cryptographic algorithm such that it has the properties of <a href="#def-Integrity" class="link-def">integrity</a>, <a href="#def-AuthenticationMessage" class="link-def">message authentication</a> and/or <a href="#def-AuthenticationSigner" class="link-def">signer authentication</a>. (However, we sometimes use the term signature generically such that it encompasses <a href="#def-AuthenticationCode" class="link-def">Authentication Code</a> values as well, but we are careful to make the distinction when the property of <a href="#def-AuthenticationSigner" class="link-def">signer authentication</a> is relevant to the exposition.) A signature may be (non-exclusively) described as <a href="#def-SignatureDetached" class="link-def">detached</a>, <a href="#def-SignatureEnveloping" class="link-def">enveloping</a>, or <a href="#def-SignatureEnveloped" class="link-def">enveloped</a>.</dd> <dt><a id="def-SignatureApplication">Signature, Application</a></dt> <dd>An application that implements the MANDATORY (<em class="rfc2119" title="REQUIRED">REQUIRED</em>/<em class="rfc2119" title="MUST">MUST</em>) portions of this specification; these conformance requirements are over application behavior, the structure of the <code>Signature</code> element type and its children (including <code>SignatureValue</code>) and the specified algorithms.</dd> <dt><a id="def-SignatureDetached">Signature, Detached</a></dt> <dd>The signature is over content external to the <code>Signature</code> element, and can be identified via a <code>URI</code> or transform. Consequently, the signature is "detached" from the content it signs. This definition typically applies to separate data objects, but it also includes the instance where the <code>Signature</code> and data object reside within the same XML document but are sibling elements.</dd> <dt><a id="def-SignatureEnveloping">Signature, Enveloping</a></dt> <dd>The signature is over content found within an <code>Object</code> element of the signature itself. The <code>Object</code> (or its content) is identified via a <code>Reference</code> (via a <code>URI</code> fragment identifier or transform).</dd> <dt><a id="def-SignatureEnveloped">Signature, Enveloped</a></dt> <dd>The signature is over the XML content that contains the signature as an element. The content provides the root XML document element. Obviously, enveloped signatures must take care not to include their own value in the calculation of the <code>SignatureValue</code>.</dd> <dt><a id="def-Transform">Transform</a></dt> <dd>The processing of a data from its source to its derived form. Typical transforms include XML Canonicalization, XPath, and XSLT.</dd> <dt><a id="def-ValidationCore">Validation, Core</a></dt> <dd>The core processing requirements of this specification requiring <a href="#def-ValidationSignature" class="link-def">signature validation</a> and <code>SignedInfo</code> <a href="#def-ValidationReference" class="link-def">reference validation</a>.</dd> <dt><a id="def-ValidationReference">Validation, Reference</a></dt> <dd>The hash value of the identified and transformed content, specified by <code> Reference</code>, matches its specified <code>DigestValue</code>.</dd> <dt><a id="def-ValidationSignature">Validation, Signature</a></dt> <dd>The <code>SignatureValue</code> matches the result of processing <code> SignedInfo</code> with&nbsp; <code>CanonicalizationMethod</code> and <code>SignatureMethod</code> as specified in <a href="#sec-CoreValidation">Core Validation</a> (section 3.2).</dd> <dt><a id="def-ValidationTrustApplication">Validation, Trust/Application</a></dt> <dd>The application determines that the semantics associated with a signature are valid. For example, an application may validate the time stamps or the integrity of the signer key -- though this behavior is external to this <a href="#def-ValidationCore" class="link-def">core</a> specification.</dd> </dl> </section> <section id="references" class="appendix"><!--OddPage--><h2><span class="secno">A. </span>References</h2><p>Dated references below are to the latest known or appropriate edition of the referenced work. The referenced works may be subject to revision, and conformant implementations may follow, and are encouraged to investigate the appropriateness of following, some or all more recent editions or replacements of the works cited. It is in each case implementation-defined which editions are supported.</p><section id="normative-references"><h3><span class="secno">A.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-ECC-ALGS">[ECC-ALGS]</dt><dd>D. McGrew; K. Igoe; M. Salter. <a href="http://www.rfc-editor.org/rfc/rfc6090.txt"><cite>RFC 6090: Fundamental Elliptic Curve Cryptography Algorithms</cite></a>. February 2011. IETF Informational RFC. URL: <a href="http://www.rfc-editor.org/rfc/rfc6090.txt">http://www.rfc-editor.org/rfc/rfc6090.txt</a> </dd><dt id="bib-FIPS-180-3">[FIPS-180-3]</dt><dd><a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf"><cite>FIPS PUB 180-3 Secure Hash Standard</cite></a>. U.S. Department of Commerce/National Institute of Standards and Technology. URL: <a href="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf</a> </dd><dt id="bib-FIPS-186-3">[FIPS-186-3]</dt><dd><a href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf"><cite>FIPS PUB 186-3: Digital Signature Standard (DSS)</cite></a>. June 2009. U.S. Department of Commerce/National Institute of Standards and Technology. URL: <a href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf">http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf</a> </dd><dt id="bib-HMAC">[HMAC]</dt><dd>H. Krawczyk, M. Bellare, R. Canetti. <a href="http://www.ietf.org/rfc/rfc2104.txt"><cite>HMAC: Keyed-Hashing for Message Authentication</cite></a>. February 1997. IETF RFC 2104. URL: <a href="http://www.ietf.org/rfc/rfc2104.txt">http://www.ietf.org/rfc/rfc2104.txt</a> </dd><dt id="bib-HTTP11">[HTTP11]</dt><dd>R. Fielding et al. <a href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer Protocol - HTTP/1.1</cite></a>. June 1999. RFC 2616. URL: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a> </dd><dt id="bib-LDAP-DN">[LDAP-DN]</dt><dd>K. Zeilenga. <a href="http://www.ietf.org/rfc/rfc4514.txt"><cite>Lightweight Directory Access Protocol : String Representation of Distinguished Names</cite></a>. June 2006. IETF RFC 4514. URL: <a href="http://www.ietf.org/rfc/rfc4514.txt">http://www.ietf.org/rfc/rfc4514.txt</a> </dd><dt id="bib-NFC">[NFC]</dt><dd>M. Davis, Ken Whistler. <a href="http://www.unicode.org/reports/tr15/"><cite>TR15, Unicode Normalization Forms.</cite></a>. 17 September 2010, URL: <a href="http://www.unicode.org/reports/tr15/">http://www.unicode.org/reports/tr15/</a> </dd><dt id="bib-PGP">[PGP]</dt><dd>J. Callas, L. Donnerhacke, H. Finney, D. Shaw, R. Thayer. <a href="http://www.ietf.org/rfc/rfc4880.txt"><cite>OpenPGP Message Format</cite></a>. IETF RFC 4880. November 2007. URL: <a href="http://www.ietf.org/rfc/rfc4880.txt">http://www.ietf.org/rfc/rfc4880.txt</a> </dd><dt id="bib-PKCS1">[PKCS1]</dt><dd>J. Jonsson and B. Kaliski. <a href="http://www.ietf.org/rfc/rfc3447.txt"><cite>Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1.</cite></a> RFC 3447 (Informational), February 2003. URL: <a href="http://www.ietf.org/rfc/rfc3447.txt">http://www.ietf.org/rfc/rfc3447.txt</a> </dd><dt id="bib-RFC2045">[RFC2045]</dt><dd>N. Freed and N. Borenstein. <a href="http://www.ietf.org/rfc/rfc2045.txt"><cite>Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies.</cite></a> November 1996. URL: <a href="http://www.ietf.org/rfc/rfc2045.txt">http://www.ietf.org/rfc/rfc2045.txt</a> </dd><dt id="bib-RFC2119">[RFC2119]</dt><dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a> </dd><dt id="bib-RFC3279">[RFC3279]</dt><dd>W. Polk, R. Housley, L. Bassham. <a href="http://www.ietf.org/rfc/rfc3279.txt"><cite>Algorithmupdates and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</cite></a>. April 2002. Internet RFC 3279. URL: <a href="http://www.ietf.org/rfc/rfc3279.txt">http://www.ietf.org/rfc/rfc3279.txt</a> </dd><dt id="bib-RFC3406">[RFC3406]</dt><dd>L. Daigle, D. van Gulik, R. Iannella, P. Faltstrom. <a href="http://www.ietf.org/rfc/rfc3406.txt"><cite> URN Namespace Definition Mechanisms.</cite></a>. IETF RFC 3406 October 2002. URL: <a href="http://www.ietf.org/rfc/rfc3406.txt"> http://www.ietf.org/rfc/rfc3406.txt</a> </dd><dt id="bib-RFC4055">[RFC4055]</dt><dd>J. Schaad, B. Kaliski, R. Housley. <a href="http://www.ietf.org/rfc/rfc4055.txt"><cite>Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</cite></a>. June 2005. IETF RFC 4055. URL: <a href="http://www.ietf.org/rfc/rfc4055.txt">http://www.ietf.org/rfc/rfc4055.txt</a> </dd><dt id="bib-RFC5280">[RFC5280]</dt><dd>D. Cooper, et. al. <a href="http://www.ietf.org/rfc/rfc5280.txt"><cite> Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile. </cite></a>. IETF RFC 5280 May 2008. URL: <a href="http://www.ietf.org/rfc/rfc5280.txt">http://www.ietf.org/rfc/rfc5280.txt</a> </dd><dt id="bib-RFC5480">[RFC5480]</dt><dd>S. Turner, et. al. <a href="http://www.ietf.org/rfc/rfc5480.txt"><cite> Elliptic Curve Cryptography Subject Public Key Information.</cite></a>. IETF RFC 5480 March 2009. URL: <a href="http://www.ietf.org/rfc/rfc5480.txt">http://www.ietf.org/rfc/rfc5480.txt</a> </dd><dt id="bib-RFC6931">[RFC6931]</dt><dd>D. Eastlake 3rd. <a href="http://tools.ietf.org/html/rfc6931"><cite>Additional XML Security Uniform Resource Identifiers</cite></a>. RFC 6931 April 2013. URL: <a href="http://tools.ietf.org/html/rfc6931">http://tools.ietf.org/html/rfc6931</a> </dd><dt id="bib-SP800-57">[SP800-57]</dt><dd><a href="http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf"><cite>Recommendation for Key Management – Part 1: General (Revision 3)</cite></a>. SP800-57. July 2012. U.S. Department of Commerce/National Institute of Standards and Technology. URL: <a href="http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf">http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf</a> </dd><dt id="bib-URI">[URI]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifiers (URI): generic syntax</cite></a>. January 2005. RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> </dd><dt id="bib-URN">[URN]</dt><dd>R. Moats. <a href="http://www.ietf.org/rfc/rfc2141.txt"><cite>URN Syntax.</cite></a> IETF RFC 2141. May 1997. URL: <a href="http://www.ietf.org/rfc/rfc2141.txt">http://www.ietf.org/rfc/rfc2141.txt</a> </dd><dt id="bib-URN-OID">[URN-OID]</dt><dd>M. Mealling. <a href="http://www.ietf.org/rfc/rfc3061.txt"><cite>A URN Namespace of Object Identifiers. </cite></a>. IETF RFC 3061. February 2001. URL: <a href="http://www.ietf.org/rfc/rfc3061.txt">http://www.ietf.org/rfc/rfc3061.txt</a> </dd><dt id="bib-UTF-8">[UTF-8]</dt><dd>F. Yergeau. <a href="http://www.ietf.org/rfc/rfc3629.txt"><cite>UTF-8, a transformation format of ISO 10646</cite></a>. IETF RFC 3629. November 2003. URL: <a href="http://www.ietf.org/rfc/rfc3629.txt">http://www.ietf.org/rfc/rfc3629.txt</a> </dd><dt id="bib-X509V3">[X509V3]</dt><dd><cite>ITU-T Recommendation X.509 version 3 (1997). "Information Technology - Open Systems Interconnection - The Directory Authentication Framework"&nbsp; ISO/IEC 9594-8:1997</cite>. </dd><dt id="bib-XML-C14N">[XML-C14N]</dt><dd>John Boyer. <a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315"><cite>Canonical XML Version 1.0</cite></a>. 15 March 2001. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2001/REC-xml-c14n-20010315">http://www.w3.org/TR/2001/REC-xml-c14n-20010315</a> </dd><dt id="bib-XML-C14N11">[XML-C14N11]</dt><dd>John Boyer; Glenn Marcy. <a href="https://www.w3.org/TR/2008/REC-xml-c14n11-20080502/"><cite>Canonical XML Version 1.1</cite></a>. 2 May 2008. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2008/REC-xml-c14n11-20080502/">http://www.w3.org/TR/2008/REC-xml-c14n11-20080502/</a> </dd><dt id="bib-XML-EXC-C14N">[XML-EXC-C14N]</dt><dd>Donald E. Eastlake 3rd; Joseph Reagle; John Boyer. <a href="https://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/"><cite>Exclusive XML Canonicalization Version 1.0</cite></a>. 18 July 2002. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/">http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/</a> </dd><dt id="bib-XML-MEDIA-TYPES">[XML-MEDIA-TYPES]</dt><dd>Ümit Yalçınalp; Anish Karmarkar. <a href="https://www.w3.org/TR/2005/NOTE-xml-media-types-20050504/"><cite>Describing Media Content of Binary Data in XML</cite></a>. 4 May 2005. W3C Note. URL: <a href="https://www.w3.org/TR/2005/NOTE-xml-media-types-20050504/">http://www.w3.org/TR/2005/NOTE-xml-media-types-20050504/</a> </dd><dt id="bib-XML-NAMES">[XML-NAMES]</dt><dd>Richard Tobin et al. <a href="https://www.w3.org/TR/2009/REC-xml-names-20091208/"><cite>Namespaces in XML 1.0 (Third Edition)</cite></a>. 8 December 2009. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2009/REC-xml-names-20091208/">http://www.w3.org/TR/2009/REC-xml-names-20091208/</a> </dd><dt id="bib-XML10">[XML10]</dt><dd>C. M. Sperberg-McQueen et al. <a href="https://www.w3.org/TR/2008/REC-xml-20081126/"><cite>Extensible Markup Language (XML) 1.0 (Fifth Edition)</cite></a>. 26 November 2008. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2008/REC-xml-20081126/">http://www.w3.org/TR/2008/REC-xml-20081126/</a> </dd><dt id="bib-XMLDSIG-XPATH-FILTER2">[XMLDSIG-XPATH-FILTER2]</dt><dd>Merlin Hughes; John Boyer; Joseph Reagle. <a href="https://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/"><cite>XML-Signature XPath Filter 2.0</cite></a>. 8 November 2002. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/">http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/</a> </dd><dt id="bib-XMLENC-CORE1">[XMLENC-CORE1]</dt><dd>J. Reagle; D. Eastlake; F. Hirsch; T. Roessler. <a href="https://www.w3.org/TR/2013/REC-xmlenc-core1-20130411/"><cite>XML Encryption Syntax and Processing Version 1.1</cite></a>. 11 April 2013. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2013/REC-xmlenc-core1-20130411/">http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411/</a> </dd><dt id="bib-XMLSCHEMA-1">[XMLSCHEMA-1]</dt><dd>Henry S. Thompson et al. <a href="https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/"><cite>XML Schema Part 1: Structures Second Edition</cite></a>. 28 October 2004. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/</a> </dd><dt id="bib-XMLSCHEMA-2">[XMLSCHEMA-2]</dt><dd>Paul V. Biron; Ashok Malhotra. <a href="https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/"><cite>XML Schema Part 2: Datatypes Second Edition</cite></a>. 28 October 2004. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/</a> </dd><dt id="bib-XPATH">[XPATH]</dt><dd>James Clark; Steven DeRose. <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/"><cite>XML Path Language (XPath) Version 1.0</cite></a>. 16 November 1999. W3C Recommendation. URL: <a href="https://www.w3.org/TR/1999/REC-xpath-19991116/">http://www.w3.org/TR/1999/REC-xpath-19991116/</a> </dd><dt id="bib-XPTR-ELEMENT">[XPTR-ELEMENT]</dt><dd>Norman Walsh et al. <a href="https://www.w3.org/TR/2003/REC-xptr-element-20030325/"><cite>XPointer element() Scheme</cite></a>. 25 March 2003. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2003/REC-xptr-element-20030325/">http://www.w3.org/TR/2003/REC-xptr-element-20030325/</a> </dd><dt id="bib-XPTR-FRAMEWORK">[XPTR-FRAMEWORK]</dt><dd>Paul Grosso et al. <a href="https://www.w3.org/TR/2003/REC-xptr-framework-20030325/"><cite>XPointer Framework</cite></a>. 25 March 2003. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2003/REC-xptr-framework-20030325/">http://www.w3.org/TR/2003/REC-xptr-framework-20030325/</a> </dd><dt id="bib-XSL10">[XSL10]</dt><dd>Jeremy Richman et al. <a href="https://www.w3.org/TR/2001/REC-xsl-20011015/"><cite>Extensible Stylesheet Language (XSL) Version 1.0</cite></a>. 15 October 2001. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2001/REC-xsl-20011015/">http://www.w3.org/TR/2001/REC-xsl-20011015/</a> </dd><dt id="bib-XSLT">[XSLT]</dt><dd>James Clark. <a href="https://www.w3.org/TR/1999/REC-xslt-19991116"><cite>XSL Transformations (XSLT) Version 1.0</cite></a>. 16 November 1999. W3C Recommendation. URL: <a href="https://www.w3.org/TR/1999/REC-xslt-19991116">http://www.w3.org/TR/1999/REC-xslt-19991116</a> </dd></dl></section><section id="informative-references"><h3><span class="secno">A.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ABA-DSIG-GUIDELINES">[ABA-DSIG-GUIDELINES]</dt><dd><a href="http://www.signelec.com/content/download/digital_signature_guidelines.pdf"><cite>Digital Signature Guidelines</cite></a>. 1 August 1996. Information Security Committee, American Bar Association. URL: <a href="http://www.signelec.com/content/download/digital_signature_guidelines.pdf">http://www.signelec.com/content/download/digital_signature_guidelines.pdf</a> </dd><dt id="bib-CVE-2009-0217">[CVE-2009-0217]</dt><dd><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0217"><cite>Common Vulnerabilities and Exposures List, CVE-2009-0217</cite></a> URL: <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0217"> http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0217</a> </dd><dt id="bib-DOM-LEVEL-1">[DOM-LEVEL-1]</dt><dd>Vidur Apparao et al. <a href="https://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/"><cite>Document Object Model (DOM) Level 1</cite></a>. 1 October 1998. W3C Recommendation. URL: <a href="https://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/">http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/</a> </dd><dt id="bib-IEEE1363">[IEEE1363]</dt><dd><a href="http://grouper.ieee.org/groups/1363/"><cite>IEEE 1363: Standard Specifications for Public Key Cryptography</cite></a>. August 2000. URL: <a href="http://grouper.ieee.org/groups/1363/">http://grouper.ieee.org/groups/1363/</a> </dd><dt id="bib-RANDOM">[RANDOM]</dt><dd>D. Eastlake, S. Crocker, J. Schiller. <a href="http://www.ietf.org/rfc/rfc4086.txt"><cite>Randomness Recommendations for Security.</cite></a>. IETF RFC 4086. June 2005. URL: <a href="http://www.ietf.org/rfc/rfc4086.txt">http://www.ietf.org/rfc/rfc4086.txt</a> </dd><dt id="bib-RDF-PRIMER">[RDF-PRIMER]</dt><dd>Frank Manola; Eric Miller. <a href="https://www.w3.org/TR/2004/REC-rdf-primer-20040210/"><cite>RDF Primer</cite></a>. 10 February 2004. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2004/REC-rdf-primer-20040210/">http://www.w3.org/TR/2004/REC-rdf-primer-20040210/</a> </dd><dt id="bib-RELAXNG-SCHEMA">[RELAXNG-SCHEMA]</dt><dd><a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip"><cite>Information technology -- Document Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based validation -- RELAX NG</cite></a>. ISO/IEC 19757-2:2008. URL: <a href="http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip">http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip</a> </dd><dt id="bib-RFC4050">[RFC4050]</dt><dd>S. Blake-Wilson; G. Karlinger; T. Kobayashi; Y. Wang. <a href="http://www.ietf.org/rfc/rfc4050.txt"><cite>Using the Elliptic Curve Signature Algorithm (ECDSA) for XML Digital Signatures (RFC 4050)</cite></a>. April 2005. RFC. URL: <a href="http://www.ietf.org/rfc/rfc4050.txt">http://www.ietf.org/rfc/rfc4050.txt</a> </dd><dt id="bib-RFC4949">[RFC4949]</dt><dd>R. Shirey. <a href="http://www.ietf.org/rfc/rfc4949.txt"><cite>Internet Security Glossary, Version 2.</cite></a>. IETF RFC 4949. August 2007. URL: <a href="http://www.ietf.org/rfc/rfc4949.txt">http://www.ietf.org/rfc/rfc4949.txt</a> </dd><dt id="bib-SAX">[SAX]</dt><dd>D. Megginson, et al. <a href="http://www.megginson.com/downloads/SAX/"><cite>SAX: The Simple API for XML</cite></a>. May 1998. URL: <a href="http://www.megginson.com/downloads/SAX/"> http://www.megginson.com/downloads/SAX/</a> </dd><dt id="bib-SHA-1-Analysis">[SHA-1-Analysis]</dt><dd>McDonald, C., Hawkes, P., and J. Pieprzyk. <a href="http://eurocrypt2009rump.cr.yp.to/837a0a8086fa6ca714249409ddfae43d.pdf"><cite>SHA-1 collisions now 2<sup>52</sup> </cite></a>. EuroCrypt 2009 Rump session. URL: <a href="http://eurocrypt2009rump.cr.yp.to/837a0a8086fa6ca714249409ddfae43d.pdf">http://eurocrypt2009rump.cr.yp.to/837a0a8086fa6ca714249409ddfae43d.pdf</a> </dd><dt id="bib-SHA-1-Collisions">[SHA-1-Collisions]</dt><dd>X. Wang, Y.L. Yin, H. Yu. <a href="http://people.csail.mit.edu/yiqun/SHA1AttackProceedingVersion.pdf"><cite>Finding Collisions in the Full SHA-1</cite></a>. In Shoup, V., editor, Advances in Cryptology - CRYPTO 2005, 25th Annual International Cryptology Conference, Santa Barbara, California, USA, August 14-18, 2005, Proceedings, volume 3621 of LNCS, pages 17–36. Springer, 2005. URL: <a href="http://people.csail.mit.edu/yiqun/SHA1AttackProceedingVersion.pdf">http://people.csail.mit.edu/yiqun/SHA1AttackProceedingVersion.pdf</a> (also published in <a href="http://www.springerlink.com/content/26vljj3xhc28ux5m/">http://www.springerlink.com/content/26vljj3xhc28ux5m/</a>) </dd><dt id="bib-SOAP12-PART1">[SOAP12-PART1]</dt><dd>Noah Mendelsohn et al. <a href="https://www.w3.org/TR/2007/REC-soap12-part1-20070427/"><cite>SOAP Version 1.2 Part 1: Messaging Framework (Second Edition)</cite></a>. 27 April 2007. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2007/REC-soap12-part1-20070427/">http://www.w3.org/TR/2007/REC-soap12-part1-20070427/</a> </dd><dt id="bib-UTF-16">[UTF-16]</dt><dd>P. Hoffman , F. Yergeau. <a href="http://www.ietf.org/rfc/rfc2781.txt"><cite>UTF-16, an encoding of ISO 10646.</cite></a> IETF RFC 2781. February 2000. URL: <a href="http://www.ietf.org/rfc/rfc2781.txt">http://www.ietf.org/rfc/rfc2781.txt</a> </dd><dt id="bib-XHTML10">[XHTML10]</dt><dd>Steven Pemberton. <a href="https://www.w3.org/TR/2002/REC-xhtml1-20020801/"><cite>XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition)</cite></a>. 1 August 2002. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2002/REC-xhtml1-20020801/">http://www.w3.org/TR/2002/REC-xhtml1-20020801/</a> </dd><dt id="bib-XML-Japanese">[XML-Japanese]</dt><dd>M. Murata. <a href="https://www.w3.org/Submission/2005/SUBM-japanese-xml-20050324/"><cite>XML Japanese Profile (2nd Edition)</cite></a>. March 2005. W3C Member Submission. URL: <a href="https://www.w3.org/Submission/2005/SUBM-japanese-xml-20050324/"> http://www.w3.org/Submission/2005/SUBM-japanese-xml-20050324/</a> </dd><dt id="bib-XMLDSIG-BESTPRACTICES">[XMLDSIG-BESTPRACTICES]</dt><dd>Pratik Datta; Frederick Hirsch. <a href="https://www.w3.org/TR/2013/NOTE-xmldsig-bestpractices-20130411/"><cite>XML Signature Best Practices</cite></a>. 11 April 2013. W3C Working Group Note. URL: <a href="https://www.w3.org/TR/2013/NOTE-xmldsig-bestpractices-20130411/">http://www.w3.org/TR/2013/NOTE-xmldsig-bestpractices-20130411/</a> </dd><dt id="bib-XMLDSIG-CORE">[XMLDSIG-CORE]</dt><dd>Joseph Reagle et al. <a href="https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/"><cite>XML Signature Syntax and Processing (Second Edition)</cite></a>. 10 June 2008. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2008/REC-xmldsig-core-20080610/">http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/</a> </dd><dt id="bib-XMLDSIG-CORE1-CHGS">[XMLDSIG-CORE1-CHGS]</dt><dd>Frederick Hirsch. <a href="https://www.w3.org/TR/2013/NOTE-xmldsig-core1-explain-20130411/"><cite>Functional Explanation of Changes in XML Signature 1.1</cite></a>. 11 April 2013. W3C Working Group Note. URL: <a href="https://www.w3.org/TR/2013/NOTE-xmldsig-core1-explain-20130411/">http://www.w3.org/TR/2013/NOTE-xmldsig-core1-explain-20130411/</a> </dd><dt id="bib-XMLDSIG-REQUIREMENTS">[XMLDSIG-REQUIREMENTS]</dt><dd>Joseph Reagle Jr. <a href="https://www.w3.org/TR/1999/WD-xmldsig-requirements-19991014"><cite>XML-Signature Requirements</cite></a>. 14 October 1999. W3C Working Draft. URL: <a href="https://www.w3.org/TR/1999/WD-xmldsig-requirements-19991014">http://www.w3.org/TR/1999/WD-xmldsig-requirements-19991014</a> </dd><dt id="bib-XMLSEC-RELAXNG">[XMLSEC-RELAXNG]</dt><dd>Makoto Murata; Frederick Hirsch. <a href="https://www.w3.org/TR/2013/NOTE-xmlsec-rngschema-20130411/"><cite>XML Security RELAX NG Schemas</cite></a>. 11 April 2013. W3C Working Group Note. URL: <a href="https://www.w3.org/TR/2013/NOTE-xmlsec-rngschema-20130411/">http://www.w3.org/TR/2013/NOTE-xmlsec-rngschema-20130411/</a> </dd><dt id="bib-XMLSEC11-REQS">[XMLSEC11-REQS]</dt><dd>Frederick Hirsch; Thomas Roessler. <a href="https://www.w3.org/TR/2013/NOTE-xmlsec-reqs-20130411/"><cite>XML Security 1.1 Requirements and Design Considerations</cite></a>. 11 April 2013. W3C Working Group Note. URL: <a href="https://www.w3.org/TR/2013/NOTE-xmlsec-reqs-20130411/">http://www.w3.org/TR/2013/NOTE-xmlsec-reqs-20130411/</a> </dd><dt id="bib-XPTR-XMLNS">[XPTR-XMLNS]</dt><dd>Jonathan Marsh et al. <a href="https://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/"><cite>XPointer xmlns() Scheme</cite></a>. 25 March 2003. W3C Recommendation. URL: <a href="https://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/">http://www.w3.org/TR/2003/REC-xptr-xmlns-20030325/</a> </dd><dt id="bib-XPTR-XPOINTER">[XPTR-XPOINTER]</dt><dd>Ron Daniel Jr; Eve Maler; Steven DeRose. <a href="https://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/"><cite>XPointer xpointer() Scheme</cite></a>. 19 December 2002. W3C Working Draft. URL: <a href="https://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/">http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/</a> </dd><dt id="bib-XPTR-XPOINTER-CR2001">[XPTR-XPOINTER-CR2001]</dt><dd>Ron Daniel Jr; Eve Maler; Steven DeRose. <a href="https://www.w3.org/TR/2001/CR-xptr-20010911/"><cite>XPointer xpointer() Scheme</cite></a>. September 2001. W3C Candidate Recommendation. URL: <a href="https://www.w3.org/TR/2001/CR-xptr-20010911/">http://www.w3.org/TR/2001/CR-xptr-20010911/</a> </dd></dl></section></section><script src="https://www.w3.org/scripts/TR/fixup.js"></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10