XML format of PID block

2,111 views
Skip to first unread message

Gaurav sharma

unread,
Jun 16, 2017, 6:48:12 AM6/16/17
to Aadhaar Registered Devices Discussion Group
Dear UIDAI

The XML format mentioned in "adhaar registered device api-2.0" 


<PidData> 
    <Resp errCode="" errInfo="" fCount="" fType="" iCount="" iType="" pCount="" pType="" nmPoints="" qScore=""/> 
    <DeviceInfo /> 
    <Skey ci="">encrypted and encoded session key</Skey> 
    <Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac> 
    <Data type="X|P"> base-64 encoded encrypted pid block </pid> 
</PidData> 
 

As we understand the "bs" and "dih" is not mentioned in the xml format.
As our team suggested that the last line should contain

 <Data type="X/Y"/><pid>pid block</pid>      
              instead of  
<Data type="X|P"> base-64 encoded encrypted pid block </pid> .
(pid block should have "bs" and "dih") 

please confirm it that whether we are right or not if not then please correct us. 

Netaji Rao

unread,
Jun 16, 2017, 7:14:20 AM6/16/17
to aadha...@googlegroups.com
Dear Gourav,

</Pid> would be a typo, need to be </Data>.
Remaining things are correct. Please refer authentication API v2.0 doc for Pid block format.

--
You received this message because you are subscribed to the Google Groups "Aadhaar Registered Devices Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aadhaar_rd+...@googlegroups.com.
To post to this group, send email to aadha...@googlegroups.com.
Visit this group at https://groups.google.com/group/aadhaar_rd.
To view this discussion on the web visit https://groups.google.com/d/msgid/aadhaar_rd/338d28aa-edba-4487-8903-b7753e3af650%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--


Thanks,
Netaji Rao D

Gaurav sharma

unread,
Jun 19, 2017, 5:42:33 AM6/19/17
to Aadhaar Registered Devices Discussion Group

Dear Netaji Rao
thanks for the reply
will you please provide us some example of the xml required to generate the pid block for RD service because in authentication document there are a lot of other fields  also

<Pid ts="" ver="" wadh=””>  
 <Demo lang="">    
 <Pi ms="E|P" mv="" name="" lname="" lmv="" gender="M|F|T" dob="" dobt="V|D|A" age="" phone="" email=""/>  
   <Pa ms="E" co="" house="" street="" lm="" loc=""          vtc="" subdist="" dist="" state="" country="" pc="" po=""/>   
  <Pfa ms="E|P" mv="" av="" lav="" lmv=""/>
   </Demo>
   <Bios dih="">   
  <Bio type="FMR|FIR|IIR|FID" posh="" bs="">encoded biometric</Bio>
   </Bios> 
  <Pv otp="" pin=""/> 
 </Pid> 
 
 we was tried to send this format for pid but it gives us an error
so please suggest us a proper format for pid block

Netaji Rao

unread,
Jun 19, 2017, 6:46:11 AM6/19/17
to aadha...@googlegroups.com
Dear Gaurav,

Assuming you are using a fingerprint device and FMR. Below would be the pidblock format when Demograohics and OTP are not part of your auth request.


<Pid ts="" ver="" wadh=””>  
   <Bios dih="">   
  <Bio type="FMR" posh="" bs="">encoded biometric</Bio>
   </Bios> 
 </Pid> 

Thanks,
Netaji Rao D

--
You received this message because you are subscribed to the Google Groups "Aadhaar Registered Devices Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aadhaar_rd+unsubscribe@googlegroups.com.

To post to this group, send email to aadha...@googlegroups.com.
Visit this group at https://groups.google.com/group/aadhaar_rd.

Gaurav sharma

unread,
Jun 19, 2017, 7:06:20 AM6/19/17
to Aadhaar Registered Devices Discussion Group
Dear Netaji Rao

Thanks for the revert

what element should be passed in the  place of "encoded biometric" within pid block?

Please check the whole xml format and if there is any mistake then correct us

Is the whole format of XML is

<PidData> 
    <Resp errCode="" errInfo="" fCount="" fType="" iCount="" pCount=""/> 
    <DeviceInfo /> 
    <Skey ci="">encrypted and encoded session key</Skey> 
    <Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac> 
    <Data type="X|P"> base-64 encoded encrypted pid block </data> 
<Pid ts="" ver="" wadh=””>  
   <Bios dih="">   
  <Bio type="FMR" posh="" bs="">encoded biometric</Bio>
   </Bios> 
 </Pid> 
</PidData>


or

<Pid ts="" ver="" wadh=””>  
   <Bios dih="">   
  <Bio type="FMR" posh="" bs="">encoded biometric</Bio>
   </Bios> 
 </Pid> 
this will generate the  base-64 encoded encrypted pid block 
and we have to put it here

<PidData> 
    <Resp errCode="" errInfo="" fCount="" fType="" iCount="" pCount=""/> 

Netaji Rao

unread,
Jun 19, 2017, 7:15:37 AM6/19/17
to aadha...@googlegroups.com
Dear Gaurav,

Encoded biometric is Base64 encoded FMR or IIR. Below is the right format for PidData XML.



<PidData> 
    <Resp errCode="" errInfo="" fCount="" fType="" iCount="" pCount=""/> 
    <DeviceInfo /> 
    <Skey ci="">encrypted and encoded session key</Skey> 
    <Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac> 
    <Data type="X|P"> base-64 encoded encrypted pid block </Data> 
</PidData> 



Thanks,
Netaji Rao D


--
You received this message because you are subscribed to the Google Groups "Aadhaar Registered Devices Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aadhaar_rd+unsubscribe@googlegroups.com.
To post to this group, send email to aadha...@googlegroups.com.
Visit this group at https://groups.google.com/group/aadhaar_rd.

aakashja...@gmail.com

unread,
Jun 30, 2020, 3:17:43 PM6/30/20
to Aadhaar Registered Devices Discussion Group
Hi,
    Can you provide FIR PID Block Implementation.
    From Our Device we get 2 type of Data 1: Template Data (Usually used for Authentication)   2: WSQ Image Data
    My question is Where to put WSQ Image Data.
which data to put in encoded biometric section 1:Template Data or 2 : WSQ Image.

<Bio type="FMR|FIR|IIR|FID" posh="" bs="">encoded biometric</Bio>    

     
<Pid ts="" ver="" wadh=””>  
 <Demo lang="">    
 <Pi ms="E|P" mv="" name="" lname="" lmv="" gender="M|F|T" dob="" dobt="V|D|A" age="" phone="" email=""/>  
   <Pa ms="E" co="" house="" street="" lm="" loc=""          vtc="" subdist="" dist="" state="" country="" pc="" po=""/>   
  <Pfa ms="E|P" mv="" av="" lav="" lmv=""/>
   </Demo>
   <Bios dih="">   
  <Bio type="FMR|FIR|IIR|FID" posh="" bs="">encoded biometric</Bio>
   </Bios> 
  <Pv otp="" pin=""/> 
 </Pid> 
 


Please, can anybody help us about what will be the use case of FIR request?
Is FIR used in every PID block authentication query?


To unsubscribe from this group and stop receiving emails from it, send an email to aadhaar_rd+...@googlegroups.com.

To post to this group, send email to aadha...@googlegroups.com.
Visit this group at https://groups.google.com/group/aadhaar_rd.

Netaji Rao

unread,
Jul 1, 2020, 1:18:53 AM7/1/20
to aadha...@googlegroups.com
Hi,

Your fingerprint scanner manufacturer should be able to provide SDK for FIR.

Or else, ISO 19794-4 doc helps in creating FIR with WSQ image.



Thanks,
Netaji Rao D

aakashja...@gmail.com

unread,
Jul 1, 2020, 12:47:14 PM7/1/20
to Aadhaar Registered Devices Discussion Group
Hi,
can you provide me  ISO 19794-4 doc   also we get 1: template and 2: wsqimage so out of these two i am using WSQ data in BIOS Tag as below :

byte[] template = hexStringToByteArray(templatestr);    // This one i am not using its template data used for authenticaion etc

 // below Fingerprint Image Data if we write  finalwsq  data in file we can view fingerprint image in WSQ Viewer  
byte[]  finalwsq  = myhexToASCII(hexwsqdata.getBytes());  

bioCapture = new BioCaptureDeviceInfo();
bioCapture.setIsoBytes(finalwsq);
bioCapture.setBh(generateHash(finalwsq));
bioCapture.setNmPoints(getMinutiaeCount(finalwsq));

so can you please confirm above way is correct or not
Reply all
Reply to author
Forward
0 new messages