DocumentID: ECMA-376/Part2/12.3
Title: ECMA-376, Part2: 12.3 Digital Signature Example
Extracted-From: ECMA-376 Office Open XML File Formats, 1st Edition / December 2006
Warning: Coverted to HTML format by a script known to have bugs

Navigation:

12.3 Digital Signature Example

The contents of digital signature parts are defined by the W3C Recommendation "XML-Signature Syntax and Processing" with some package-specific modifications specified in §12.2.4.1.

[Example:

Digital signature markup for packages is illustrated in this example. For information about namespaces used in this example, see Annex F, "Standard Namespaces and Content Types."

<Signature Id="SignatureId" xmlns="http://www.w3.org/2000/09/xmldsig#"> 

   <SignedInfo>

      <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/

         REC-xml-c14n-20010315"/> 

      <SignatureMethod Algorithm="http://www.w3.org/2000/09/

         xmldsig#dsa-sha1"/> 

      <Reference 

         URI="#idPackageObject" 

         Type="http://www.w3.org/2000/09/xmldsig#Object">

         <Transforms>

            <Transform Algorithm="http://www.w3.org/TR/2001/

               REC-xml-c14n-20010315"/>

         </Transforms>

         <DigestMethod Algorithm="http://www.w3.org/2000/09/

            xmldsig#sha1"/> 

         <DigestValue>...</DigestValue> 

      </Reference>

      <Reference 

         URI="#Application" 

         Type="http://www.w3.org/2000/09/xmldsig#Object">

         <Transforms>

            <Transform Algorithm="http://www.w3.org/TR/2001/

               REC-xml-c14n-20010315"/>

         </Transforms>

         <DigestMethod 

            Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 

         <DigestValue>...</DigestValue> 

      </Reference>

   </SignedInfo>

   <SignatureValue>...</SignatureValue>

   <KeyInfo>

      <X509Data>

         <X509Certificate>...</X509Certificate>

      </X509Data>

   </KeyInfo>

   <Object Id="idPackageObject" xmlns:pds="http://schemas.openxmlformats.org
     /package/2006/digital-signature">

      <Manifest>

         <Reference URI="/document.xml?ContentType=application/

            vnd.ms-document+xml">

            <Transforms>

               <Transform Algorithm="http://www.w3.org/TR/2001/

                  REC-xml-c14n-20010315"/>

            </Transforms>

            <DigestMethod Algorithm="http://www.w3.org/2000/09/

               xmldsig#sha1"/> 

            <DigestValue>...</DigestValue> 

         </Reference>

         <Reference 

            URI="/_rels/document.xml.rels?ContentType=application/

               vnd.ms-package.relationships+xml">

            <Transforms>

               <Transform Algorithm="http://schemas.openxmlformats.org/

                  package/2005/06/RelationshipTransform">

                  <pds:RelationshipReference SourceId="B1"/>

                  <pds:RelationshipReference SourceId="A1"/>

                  <pds:RelationshipReference SourceId="A11"/>

                  <pds:RelationshipsGroupReference SourceType=

                     "http://schemas.custom.com/required-resource"/>

               </Transform>

               <Transform Algorithm="http://www.w3.org/TR/2001/

                  REC-xml-c14n-20010315"/>

            </Transforms>

            <DigestMethod Algorithm="http://www.w3.org/2000/09/

               xmldsig#sha1"/> 

            <DigestValue>...</DigestValue> 

         </Reference>

      </Manifest>

      <SignatureProperties>

         <SignatureProperty Id="idSignatureTime" Target="#SignatureId">

            <pds:SignatureTime>

               <pds:Format>YYYY-MM-DDThh:mmTZD</pds:Format>

               <pds:Value>2003-07-16T19:20+01:00</pds:Value>

            </pds:SignatureTime>

         </SignatureProperty> 

      </SignatureProperties>

   </Object>

   <Object Id="Application">...</Object>
</Signature>

end example]


Converted to HTML format by ooxmlspec2html 0.1, a Perl script provided by OpenISO.org.