title: How do I decide the `DigestValue`, `SignatureValue` and `RSAKeyValue` for digital signing of XML
body: <p>I am working on a project where I need to verify the <code>xml</code> is digitally signed or not.
  Its  really getting hard for me to try and validate the <code>XML</code> for the key values for following</p>
  
  <pre><code>    &lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;
      &lt;SignedInfo&gt;
        &lt;CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /&gt;
        &lt;SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /&gt;
        &lt;Reference URI=**Some URI Value**&gt;
          &lt;Transforms&gt;
            &lt;Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /&gt;
            &lt;Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"&gt;
  
            &lt;/Transform&gt;
          &lt;/Transforms&gt;
          &lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /&gt;
          &lt;DigestValue&gt;**Some Digest Value**&lt;/DigestValue&gt;
        &lt;/Reference&gt;
      &lt;/SignedInfo&gt;
      &lt;SignatureValue&gt;**Some Signature Value**&lt;/SignatureValue&gt;
    &lt;KeyInfo xmlns:type="http://www.w3.org/2000/09/xmldsig#RSAKeyValue"&gt;  
      &lt;RSAKeyValue&gt;&lt;Modulus&gt;**Some RSA Key Value**&lt;/Modulus&gt;  
       &lt;Exponent&gt;AQAB&lt;/Exponent&gt;
      &lt;/RSAKeyValue&gt;
     &lt;/KeyInfo &gt;  
  &lt;/Signature&gt;
  </code></pre>
  
  <p>I am not able to trace out how I can get the values for </p>
  
  <ol>
  <li><code>Reference URI</code></li>
  <li><code>Digest Value</code></li>
  <li><code>Signature Value</code></li>
  <li><code>RSA Modulus Value</code></li>
  </ol>
  
  <p>Can any one tell me how I can get the values of the all above?
  and what is the logic behind using these much combinations in XML Validation?</p>
  
  <p>I am using <code>C#</code> for checking validations.
  you can check code for c# in my previous questions </p>
  
  <ol>
  <li><a href="https://stackoverflow.com/q/31113391/3110262">How to validate XML for following code</a></li>
  </ol>
  
  <p>Thanks in advance.</p>