title: Parsing and validating Aadhar paperless offline eKYC?
body: <p>I generated my offline eKYC XML using <a href="https://resident.uidai.gov.in/offline-kyc" rel="nofollow noreferrer">https://resident.uidai.gov.in/offline-kyc</a>.</p>
  
  <p>The XML tag, including the signature is like this -</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;OfflinePaperlessKyc referenceId="someID"&gt;&lt;UidData&gt;&lt;Poi dob="08-09-1984" e="encrypted email" gender="M" m="encrypted mobile" name="Name"/&gt;&lt;Poa careof="" country="India" dist="Pune" house="Address" landmark="" loc="Address2 " pc="411045" po="N.i.a." state="Maharashtra" street="" subdist="Pune City" vtc="Pune City"/&gt;&lt;Pht&gt;encoded&lt;/Pht&gt;&lt;/UidData&gt;&lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;&lt;SignedInfo&gt;&lt;CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/&gt;&lt;SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/&gt;&lt;Reference URI=""&gt;&lt;Transforms&gt;&lt;Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/&gt;&lt;/Transforms&gt;&lt;DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/&gt;&lt;DigestValue&gt;LbEZZGdjoI0359QTtFJxO+53xdkWgzRhGdSb+gspDKk=&lt;/DigestValue&gt;&lt;/Reference&gt;&lt;/SignedInfo&gt;&lt;SignatureValue&gt;encoded signature&lt;/SignatureValue&gt;&lt;/Signature&gt;&lt;/OfflinePaperlessKyc&gt;
  </code></pre>
  
  <p>Now, we need to validate the info in this XML, like mobile/email etc., against info in our system, which is being used by the user, </p>
  
  <p>I looked for Uidai's site looking for developer guides and found through <a href="https://uidai.gov.in/2-uncategorised/11320-aadhaar-paperless-offline-e-kyc-3.html" rel="nofollow noreferrer">https://uidai.gov.in/2-uncategorised/11320-aadhaar-paperless-offline-e-kyc-3.html</a></p>
  
  <p>This has a section -
  Technical Facets of Aadhaar Paperless Offline e-KYC</p>
  
  <p>However, the components of the XML are not exactly matching with what I have in my doc.</p>
  
  <p>I don't have signature under <code>s=</code>. I have as specified above.</p>
  
  <p>Also, dob is present under <code>dob</code> tag in my xml. In this guide, it is given <code>d=</code> though.</p>
  
  <p>Also, the signature in my case is 348 characters, whereas the guide mentions 344 characters.</p>
  
  <p>Can someone guide with this?</p>