Results 1 to 5 of 5

Thread: How to implement XML Digital Signature

  1. #1
    Join Date
    Jan 2010
    Posts
    48

    How to implement XML Digital Signature

    I am creating a project in HTML where my project requirement is to implement XML Digital Signature and i don't have any idea about it and how to implement it, without it my project will be of no use, i had asked my friends about it but they also don't have much more idea about it. Any help would be very helpful for me and i would be great if you first explain me what is digital signature

  2. #2
    Join Date
    Jan 2006
    Posts
    211

    Information about Digital Signature

    Digital signature is a value computed with cryptographic algorithm and it is added to data in such a way that any person who is receiving it can use the signature to verify the data origin and integrity, nowadays most of the people use digital signature if they are sending some important on email. For example whenever you get bank statement on email it has digital signature in it.

  3. #3
    Join Date
    Mar 2008
    Posts
    232

    Implement XML Digital Signature

    Definitely i will help you out with this in the below code you can see that it is being indented and formatted for readability and at the same time note that Signature element is being inserted inside the content that is being use for making an enveloped signature

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <PurchaseOrder>
     <Item number="130046593231">
      <Description>Video Game1</Description>
      <amt>10.29</amt>
     </Item>
     <Buyer id="8492340">
      <Name>Your Name</Name>
      <Address>
       <Street>Street Name</Street>
       <Town>City Name</Town>
       <State>State Name</State>
       <Country>Country Name</Country>
       <PostalCode>Postal code </PostalCode>
      </Address>
     </Buyer>
     <Signature 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#rsa-sha1"/>
       <Reference URI="">
        <Transforms>
         <Transform
          Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        <DigestValue>tVicGh6V+8cHbVYFIU91o5+L3OQ=</DigestValue>
       </Reference>
      </SignedInfo>
      <SignatureValue>
       dJDHiGQMaKN8iPuWApAL57eVnxz2BQtyujwfPSgE7HyKoxYtoRB97ocxZ
       8ZU440wHtE39ZwRGIjvwor3WfURxnIgnI1CChMXXwoGpHH//Zc0z4ejaz
       DuCNEq4Mm4OUVTiEVuwcWAOMkfDHaM82awYQiOGcwMbZe38UX0oPJ2DOE=
      </SignatureValue>
      <KeyInfo>
       <X509Data>
        <X509SubjectName>
         CN=My Name,O=Test Certificates Inc.,C=US
        </X509SubjectName>
        <X509Certificate>
         MIIB9zCCAWCgAwIBAgIERZwdkzANBgkqhkiG9w0BAQUFADBAMQswCQYD
         VQQGEwJVUzEfMB0GA1UEChMWVGVzdCBDZXJ0aWZpY2F0ZXMgSW5jLjEQ
         MA4GA1UEAxMHTXkgTmFtZTAeFw0wNzAxMDMyMTE4MTFaFw0zMTA4MjUy
         ...
        </X509Certificate>
       </X509Data>
      </KeyInfo>
     </Signature>
    </PurchaseOrder>

  4. #4
    Join Date
    Jan 2010
    Posts
    48

    How to implement XML Digital Signature

    Thank you for providing example but it would be great if you can example me SignatureMethod, Reference, and Canonicalized SignedInfo

  5. #5
    Join Date
    Mar 2008
    Posts
    232

    How to implement XML Digital Signature

    In my example SignatureMethod is being used to generate the signature, in my example i had used PKCS#1 RSA-SHA1 algorithm which is being described in RFC 2437 and one or more Reference elements identify the data that is signed. Each Reference element identifies the data by way of a URI and canonicalized SignedInfo is the element which is being used before it is being signed, this is useful for debugging canonicalization and signature verification failures.

Similar Threads

  1. Digital signature does not validate or is not present
    By Victor Kam in forum Windows XP Support
    Replies: 1
    Last Post: 18-03-2013, 06:35 PM
  2. What is the difference between a Digital Signature and a Public Key
    By Messenger in forum Networking & Security
    Replies: 4
    Last Post: 12-04-2010, 05:55 PM
  3. What is the Digital signature in cryptography?
    By beelow in forum Networking & Security
    Replies: 3
    Last Post: 01-12-2009, 08:27 AM
  4. Digital Signature for Authentication
    By Sadashiva in forum Networking & Security
    Replies: 3
    Last Post: 14-02-2009, 09:33 PM
  5. What is Digital signature of a software?
    By Sawantji in forum Windows Software
    Replies: 2
    Last Post: 11-09-2008, 08:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,429,643.45151 seconds with 17 queries