Aadhaar Authentication API 1 6
Aadhaar Authentication API 1 6
Aadhaar Authentication API 1 6
AADHAAR AUTHENTICATION
API SPECIFICATION - VERSION 1.6
JANUARY 2014
Version 1.6
Table of Contents
1.
INTRODUCTION ............................................................................................................................ 3
1.1
1.2
1.3
1.4
2.
3.
AADHAAR NUMBER................................................................................................................... 6
AADHAAR AUTHENTICATION AT A GLANCE ................................................................................. 6
AADHAAR AUTHENTICATION USAGE .......................................................................................... 7
CONCLUSION ........................................................................................................................... 7
5.
APPENDIX .................................................................................................................................... 36
5.1
5.2
UIDAI, 2011-2014
http://uidai.gov.in/
Page 2 of 37
Version 1.6
1.
Introduction
The Unique Identification Authority of India (UIDAI) has been created, with the
mandate of providing a Unique Identity (Aadhaar) to all Indian residents. The UIDAI
proposes to provide online authentication using demographic and biometric data.
Aadhaar authentication means the process wherein Aadhaar Number, along with
other attributes, including biometrics, are submitted to the Central Identities Data
Repository (CIDR) for its verification on the basis of information or data or documents
available with it. UIDAI will provide an online service to support this process. Aadhaar
authentication service only responds with a yes/no and no personal identity
information is returned as part of the response.
1.1
UIDAI, 2011-2014
http://uidai.gov.in/
Page 3 of 37
Version 1.6
1.2
Terminology
http://uidai.gov.in/
Page 4 of 37
Version 1.6
1.3
Legal Framework
UIDAI has developed necessary legal framework and processes around Aadhaar
authentication. These documents specify AUA/ASA registration process, security
framework, operating model and covers their obligations, responsibilities and liabilities.
1.4
UIDAI, 2011-2014
http://uidai.gov.in/
Page 5 of 37
Version 1.6
2.
This chapter describes Aadhaar authentication, some of the envisioned usage scenarios,
and working details. Technical details follow in subsequent chapters.
2.1
Aadhaar Number
The Unique Identification (Aadhaar) Number, which identifies a resident, will give
individuals the means to clearly establish their identity to public and private agencies
across the country. Three key characteristics of Aadhaar Number are:
1. Permanency (Aadhaar number remains same during lifetime of a resident)
2. Uniqueness (one resident has one ID and no two residents have same ID)
3. Global (same identifier can be used across applications and domains)
Aadhaar Number is provided during the initiation process called enrolment where a
residents demographic and biometric information are collected and uniqueness of the
provided data is established through a process called de-duplication. Post deduplication, an Aadhaar Number is issued and a letter is sent to resident informing the
details.
2.2
Aadhaar authentication is the process wherein Aadhaar Number, along with other
attributes, including biometrics, are submitted online to the CIDR for its verification on
the basis of information or data or documents available with it.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 6 of 37
Version 1.6
2.3
2.4
Conclusion
UIDAI, 2011-2014
http://uidai.gov.in/
Page 7 of 37
Version 1.6
3.
This chapter describes the API in detail including the authentication flow,
communication protocol, and data formats.
3.1
Authentication Flow
Scenario
in the diagram is a typical authentication flow and is a case of an operator
assisted transaction at a PoS terminal:
a) Resident provides Aadhaar Number, necessary demographic and biometric
details to terminal devices belonging to the AUA/SA (or merchant/operator
appointed by AUA/SA) to obtain a service offered by the AUA/SA.
b) Aadhaar authentication enabled application software that is installed on the
device packages these input parameters, encrypts, and sends it to AUA server
over either a mobile/broadband network using AUA specific protocol.
c) AUA server, after validation adds necessary headers (AUA specific wrapper XML
with license key, transaction id, etc.), and passes the request through ASA server
to UIDAI CIDR.
d) Aadhaar authentication server returns a yes/no based on the match of the
input parameters.
e) Based on the response from the Aadhaar authentication server, AUA/SA
conducts the transaction.
2
Scenario
below depicts the resident conducting assisted/self-service transactions
with Aadhaar authentication on his/her mobile or on the Internet.
a) In this case, transaction data is captured on the mobile/Internet application
provided by AUA/SA to residents
b) Resident provides necessary demographic data long with OTP (fingerprint/iris is
also possible although not yet common on mobiles or PCs) in addition to AUA
specific attributes (account number, password, PIN, etc.)
c) Step c, d, and e are same as in scenario 1 above.
Scenario
is a slight variant of 2nd scenario where AUA also plays the role of ASA
4
UIDAI, 2011-2014
http://uidai.gov.in/
Page 8 of 37
Version 1.6
3.2
API Protocol
UIDAI, 2011-2014
http://uidai.gov.in/
Page 9 of 37
Version 1.6
API input data should be sent to this URL as XML document using Content-Type
application/xml or text/xml.
For security reason data collected for Aadhaar authentication must not be stored
in the devices or log files. Its essential for ASA and AUA to maintain audit records for
all the authentication request metadata along with the response.
As a best practice, for all SSL communications the agencies should automatically
validate the SSL certificate and ensure it is validated against the revocation list
online.
3.2.1 Element Details
host Aadhaar authentication server address. Actual production server address will be
provided to ASAs. Note that production servers can only be accessed through private
secure connection. ASA server should ensure that actual URL is configurable. (For
development and testing purposes, public URL auth.uidai.gov.in can be used.)
ver Authentication API version (optional). If not provided, URL points to current
version. UIDAI may host multiple versions for supporting gradual migration. As of this
specification, default production version is 1.6.
ac A unique code for the AUA which is assigned by UIDAI. This is an alpha-numeric
string having maximum length 10. (A default value public is available for testing.)
uid[0] and uid[1] First 2 digits of Aadhaar Number. Used for load-balancing.
asalk A valid ASA license key. ASAs must send one of their valid license keys at the
end of the URL. It is important that license keys are maintained safely. When adding
license key to the URL, ensure it is URL encoded to handle special characters.
For all valid responses, HTTP response code 200 is used. All application error codes are
encapsulated in response XML element. In the case of connection and other server
errors, standard HTTP error response codes are used (4xx codes such as 403, 404, etc.).
HTTP automatic redirects also should be handled by ASA server.
ASA server must send one of their valid license keys as part of the URL (see
.
details above). Authentication related APIs are enabled only for valid ASAs and only
for their registered static IP addresses coming through a secure private network.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 10 of 37
Version 1.6
3.3
Aadhaar authentication uses XML as the data format for input and output. To avoid
sending unnecessary data, do not pass any optional attribute or element unless its value
is different from default value. Any bad data or extra data will be rejected.
Following is the XML data format for authentication API:
<Auth uid= tid= ac= sa= ver= txn= lk=>
<Uses pi= pa= pfa= bio= bt= pin= otp=/>
<Tkn type= value=/>
<Meta udc= fdc= idc= pip= lot=G|P lov=/>
<Skey ci= ki=>encrypted and encoded session key</Skey>
<Data type=X|P>encrypted PID block</Data>
<Hmac>SHA-256 Hash of Pid block, encrypted and then encoded</Hmac>
<Signature>Digital signature of AUA</Signature>
</Auth>
Data element contains Pid (Personal Identity Data) element which is a base-64
encoded encrypted block. Complete Data block should be encrypted at the time of
capture on the capture device. But, encoding (base-64) of Data block and packaging it
with enveloping XML under Auth element can either be done on the device or on the
AUA server based on the AUA needs. Device capability, protocol between devices and
AUA server, and data format used between devices and AUA server, etc. should be
considered for making that choice.
When using PID block in XML format (which is the default), following is the format for
Pid element:
<Pid ts= ver=>
<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= pc= po=/>
<Pfa ms=E|P mv= av= lav= lmv=/>
</Demo>
<Bios>
<Bio type=FMR|FIR|IIR posh=>encoded biometric</Bio>
</Bios>
<Pv otp= pin=/>
</Pid>
Instead of XML format, this version also allows PID block to be in binary format based
on Protocol Buffers standard ((http://code.google.com/p/protobuf/). Notice that
Auth XML must be in XML format. Binary format is only supported for PID block to
enable smaller packet sizes to be transmitted from devices. See Appendix for details.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 11 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 12 of 37
Version 1.6
Attributes:
pi (mandatory) Valid values are y or n. If the value is y then at least one
attribute of element Pi (part of Demo element) should be used in
authentication. If value is n", Pi element is not mandated.
pa (mandatory) Valid values are y or n. If the value is y then at least one
attribute of element Pa (part of Demo element) should be used in
authentication. If value is n", Pa element is not mandated.
pfa (mandatory) Valid values are y or n. If the value is y then element
Pfa (part of Demo element) should be used in authentication. If value is n",
Pfa element is not mandated.
bio (mandatory) Valid values are y or n. If the value is y then at least one
biometric element Bio (part of Bios element) should be used in
authentication. If value is n", Bio element is not mandated.
bt (mandatory only if bio attribute has value y) provide a comma separated
list of biometrics used. Valid values that can be used in this comma separated list
are FMR, FIR, and IIR. If FMR is part of the list, then at least one Bio
element with type FMR should be used. Similarly, if FIR or IIR are part of the
list, then at least one Bio element with those types must be used.
pin (mandatory) Valid values are y or n. If the value is y then PIN should
be used in authentication. Otherwise, pin is not mandated.
otp (mandatory) Valid values are y or n. If the value is y then OTP should
be used in authentication. Otherwise, otp is not mandated.
Element: Tkn (optional)
This element can be used to provide a valid token details which is provided to
resident such as mobile phone, NFC token, Smart Card, etc.. Currently, only the
mobile number is considered a valid token.
This is useful for adding second factor (what resident has) for a self-service
transaction from the residents registered mobile phone. This is for advanced
usage only.
NOTE: If Token feature needs to be used, AUA must tie up with Telcos and
derive the phone number of the phone from which the transaction originates.
Attributes:
type (mandatory) Type of the token. Currently only valid value is 001
representing mobile phone. UIDAI may add support for additional tokens such as
NFC card in future.
value (mandatory) Token Number. Currently it must be the registered mobile
number of the resident (without any prefix such as 0 or +91) and must be
derived from Telco network.
Element: Meta (Mandatory)
This element specifies metadata related to the device and transaction. This is
mandatory for better tracking, reporting, and trouble shooting.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 13 of 37
Version 1.6
Attributes:
udc (mandatory) Unique Host/Terminal Device Code. This is a unique code for
the host device assigned within the AUA domain. This is an alpha-numeric string
of maximum length 20.
o This allows better reporting and tracking of devices as well as help
resolve issues at the device level.
o It is highly recommended that AUAs define a unique codification scheme
for all their devices.
o Suggested format is [vendorcode][date of deployment][serial number]
fdc (mandatory) Fingerprint device code. This is a unique code provided for
the fingerprint sensor-extractor combination. AUAs should obtain this code from
sensor providers for certified sensors. This is an alpha-numeric string of
maximum length 10.
o While using fingerprint authentication, this code is mandatory and should
be provided. If the code is unknown or device is not certified yet, use NC.
o For non fingerprint authentication (when not using bio type FMR or
FIR), use the value NA
idc (mandatory) Iris device code. This is a unique code provided for the iris
sensor-extractor combination. AUAs should obtain this code from sensor
providers for certified sensors. This is an alpha-numeric string of maximum
length 10.
o While using iris authentication, this code is mandatory and should be
provided. If the code is unknown or device is not certified yet, use NC.
o For non iris authentication, use the value NA
pip (mandatory) Public IP address of the device. If the device is connected to
Internet and has a public IP, then this must be populated with that IP address. If
the device has a private IP and is behind a router/proxy/etc, then public IP
address of the router/proxy/etc should be set. If no public IP is available, leave it
as NA.
lot (mandatory) Location type. Valid values are G and P.
o G stands for geo coding in lat, long format
o P stands for postal pin code
lov (mandatory) Location Value.
o If lot value is G then, this lov attribute must carry actual lat,long,alt
of the location. Can be derived using GPS or using alternate method.
Lat/Long should be in positive or negative decimal format (ISO 6709).
Altitude is optional and may be populated if available. This can be of
maximum length 39 (lat and long being maximum length of 15 in
nnnnnnnnnn.nnnn format and alt being maximum length of 7 in
nnnn.nn format with 2 commas in between them)
o If lot value is P then, this lov attribute must have a valid 6-digit
postal pin code.
Element: Skey (mandatory)
Value of this element is base-64 encoded value of encrypted 256-bit AES session
key. Session key must be dynamically generated for every transaction
UIDAI, 2011-2014
http://uidai.gov.in/
Page 14 of 37
Version 1.6
(session key must not be reused) and must not be stored anywhere except
in memory. See next chapter for encryption details.
Attributes:
ci (mandatory) Public key certificate identifier using which skey was
encrypted. UIDAI may have multiple public keys in field at the same time. Value
of this attribute is the certificate expiration date in the format YYYYMMDD.
Expiry date of the certificate can be obtained from the certificate itself.
ki (optional) This is for advanced use only. Do not use this attribute unless
you clearly understand what you are doing. See chapter on API and Data
Security for details.
Element: Data (mandatory)
Contains the encrypted Pid element in base-64 format. See Pid element
definition later.
Attributes:
type (optional) Type of the PID block format. It can have two values X for
XML and P for Protobuf binary format. Default value is assumed to be X.
Element: Hmac (mandatory)
Devices which is constructing the Pid element must perform the following to
provide the Hmac value:
o If Pid type is X (XML), then:
After forming Pid XML, compute SHA-256 hash of Pid XML string
Then encrypt using session key (skey)
Then encode using base-64 encoding (as described earlier,
encoding can be done on the AUA server when forming final Auth
XML)
o If Pid type is P (Protobuf), then:
After forming Protobuf byte array for Pid, compute SHA-256 hash
of Pid protobuf bytes.
Then encrypt using session key (skey)
Then encode using base-64 encoding (as described earlier,
encoding can be done on the AUA server when forming final Auth
XML)
Authentication server performs the following processing on each authentication
request:
1. Decode and Decrypt the Pid from Data element. Based on type attribute of
the Data element, the value of Data is either interpreted as XML or Protobuf
bytes.
2. Re-compute the SHA-256 Hash of Pid.
3. Decode and decrypt the value of Hmac element.
4. Compare the re-computed SHA-256 hash with Hmac value received in
authentication request.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 15 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 16 of 37
Version 1.6
ver (mandatory) version of the Pid element. Currently only valid value is
1.0. Notice that this is NOT same as Auth API version. Since authentication
devices are responsible for generation of Pid XML, and there is a possibility
that if there is a change in the structure of Pid XML, all the devices may not
upgrade to latest software version.
UIDAI, 2011-2014
Language code
01
02
05
06
07
11
12
http://uidai.gov.in/
Page 17 of 37
Version 1.6
13
15
16
20
21
22
NOTE: Indian language matching of name and address allows data to be matched in any
of the above languages using a fuzzy matching logic. In the case of address where
multiple fields are provided as a single string (using lav attribute), it is recommended
to separate each field (house, street, locality, vtc, district, etc) by comma.
Element: Pi (Optional)
This element captures attributes related to Personal Identity
Attributes:
ms (optional) Matching Strategy for name attribute. Valid values are E
(Exact match) and P (Partial match). This is used only for name attribute.
Defaulted to E.
mv (optional) Match value for name attribute. Valid values are the integers
in the range 1 100 (inclusive). Default value is 100. mv attribute value
MUST be specified when matching strategy (ms attribute) is P.
It represents the percentage of full words from the name stored in Aadhaar
database that must be specified in the name attribute for the match to be
considered successful. See examples below as part of name attribute
description.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 18 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 19 of 37
Version 1.6
lmv (optional) Local Language Match Value to adjust phonetic match threshold.
This is a value between 1 and 100 (both inclusive).
gender (optional) Valid values are M for male, F for female, and T for
transgender.
dob (optional) Date of Birth in YYYY-MM-DD format. If only year needs to be
authenticated, then use format YYYY.
dobt (optional) Date of Birth Type as indicated in Aadhaar system. This
attribute can have only 3 values V (for Verified), D (for Declared), and A
(Approximate). When the resident is enrolled, DoB may be recorded along with
any of these types.
age (optional) In certain use cases such as checking whether a resident can be
considered a senior citizen or whether a resident is an adult (age above or equal
to 18 years), it may be desired that only age of a resident can be verified using
Aadhaar Authentication instead of verifying against complete data of birth. When
age attribute is specified, authentication will pass if residents age is equal to
or greater than the input age. Else, it will fail with appropriate authentication
error code.
phone (optional) Registered mobile phone number of the resident.
email (optional) Registered email address of the resident. This is caseinsensitive match removing trailing and leading spaces.
Element: Pa (Optional)
This element captures attributes related to Personal Address. These are
address fields as provided by the resident during enrolment or later updates.
Only attributes that are sent as part of input will be compared.
This element should not be used when using Pfa element as Pa and Pfa are
mutually exclusive.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 20 of 37
Version 1.6
Attributes:
All attributes are compared case insensitive after leading and trailing spaces are
trimmed and all the occurrences of consecutive spaces are replaced with single
space.
ms (optional) Matching Strategy for address attributes. Only the value E
(Exact match) is supported. This is used only when at least one address attribute
is specified.
co (optional) Care of persons name.
house (optional) House identifier.
street (optional) Street name.
lm (optional) Landmark if any.
loc (optional) Locality where resident resides.
vtc (optional) Name of village or town or city.
subdist (optional) Sub-District name.
dist (optional) District name.
state (optional) State name.
pc (optional) Postal pin code.
po (optional) Post Office name.
Element: Pfa (Optional)
This element captures attributes related to Personal Full Address. It
corresponds to the address of the resident as present in enrolment receipt or
Aadhaar letter.
This element should not be used when using Pa element as Pa and Pfa are
mutually exclusive.
Attributes:
ms (optional) Matching Strategy for address attributes. Valid values are E
(Exact match) and P (Partial match).
mv (optional) Valid values are integers in the range 1 -100 (inclusive). Default
value is 100. It is used only when matching strategy (ms attribute) is P
(Partial match).
It represents the percentage of full words from the address stored in Aadhaar
database that must be specified in the av attribute for the match to be
considered successful,
av (optional) Residents full address specified as a single string value.
Normalization:
av value and the residents address stored in Aadhaar database, both are
normalized using following rules before comparison.
1. Following characters/phrases are ignored:
a. Period - (.)
b. Comma (,)
c. Hyphen (-)
d. Asterisk (*)
UIDAI, 2011-2014
http://uidai.gov.in/
Page 21 of 37
Version 1.6
http://uidai.gov.in/
Page 22 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 23 of 37
Version 1.6
Element: Pv (optional)
This element (Pin Value) allows support for additional factors pin and otp.
Attributes:
pin (optional) Actual value of PIN as set by resident. This attribute contains a 6
digit numeric value. This option is NOT available for AUAs and is restricted
to internal UIDAI usage only.
otp (optional) Most recently generated One Time Pin (OTP) value for resident
(Note that one resident can ONLY have one active OTP value). Unlike PIN, OTP is
a one-time usage token and expires if not used within few minutes. See Aadhaar
OTP API for details on requesting OTP.
As per UIDAI security policy, if number of failed attempts crosses upper limit,
Aadhaar record may be put on hold. The upper limit is dynamically computed based
on various heuristics and is not a static number.
3.4
Authentication API does not provide any identity data as part of the response. All it does
is to match given input and respond with a yes/no. Response XML is as follows:
<AuthRes ret=y|n code= txn= err= ts= actn= info=>
<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#rsasha256" />
<Reference URI="">
<Transforms>
<Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#envelopedsignature" />
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha256"/>
<DigestValue></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue></SignatureValue>
</Signature>
</AuthRes>
UIDAI, 2011-2014
http://uidai.gov.in/
Page 24 of 37
Version 1.6
Agencies that use the authentication response need a mechanism to validate the
authenticity of the authentication response for non-repudiation purposes. In order to
enable verification and audit, authentication response will be digitally signed by UIDAI
and the signature will be part of the response. AUAs are expected to preserve the entire
response XML for non-repudiation purposes.
3.4.1 Element Details
Element: AuthRes
Attributes:
ret this is the main authentication response. It is either y or n.
code unique alphanumeric authentication response code having maximum
length 40. If the input is not processed due to errors such as decryption, wrong
hmac value, etc., a value of NA will be returned. Once the integration is tested,
this should not happen. But, due to some transmission errors or changes in
deployments, if code is returned as NA, AUAs may retry the transaction and if it
continues to fail, may report to UIDAI technical support.
txn Authenticator specific transaction identifier. This is exactly the same value
that is sent within the request.
ts Timestamp when the response is generated. This is of type XSD dateTime.
actn (optional). This attribute may or may not exist in response. This attribute,
alpha-numeric of max length 5, provides specific action codes (published from
time to time) meant to be shown to resident/operator.
o One possible use is to provide personalized resident feedback to improve
authentication outcomes and required data update notifications.
o This attribute MUST be sent to front-end application by KSA and KUA
to ensure action and corresponding message is displayed to
resident/operator.
info This attribute provides meta information on the details included in auth.
This can be up to 128 characters and is composed of the following parts:
Version 2.0 structure of info (latest):
<Version>{SHA-256 of Aadhaar Number, SHA-256 of Demo
element,
Encoded
Usage
Data,
pid_version,
timestamp,
fmrcount, fircount, iircount, auth_api_ver, SHA-256 of ASA
code, SHA-256 of AUA code, SUB AUA code, lot, lov, lang, pims, pi-mv, pi-lmv, pa-ms, pa-mv, pa-lmv, pfa-ms, pfa-mv,
pfa-lmv, SHA-256 of tid}
UIDAI, 2011-2014
http://uidai.gov.in/
Page 25 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 26 of 37
Version 1.6
pid_version Version string of the PID block which was part of input
timestamp PID ts string which was part of input
fmrcount Total number of FMR records which was part of input
UIDAI, 2011-2014
http://uidai.gov.in/
Page 27 of 37
Version 1.6
Number><SHA-256
of
Demo
UIDAI, 2011-2014
http://uidai.gov.in/
Page 28 of 37
Version 1.6
UIDAI, 2011-2014
http://uidai.gov.in/
Page 29 of 37
Version 1.6
Where:
01 is the version of info structure
66c782e8f95ba958f28adaae576c42a263c2449af416fb8444
99bef7fd41b2d0 is the SHA-256 hash of Aadhaar Number
0212be474bf2a6bfd4f361389ae66809babc144829129ae231
5d6bab020455aa is the SHA-256 hash of Demo element (as a
String)
1B8002200000 (binary bits
000110111000000000000010001000000000000000000000)
is the encoded usage data representing usage of Name, Gender,
DoB, Phone, FMR, and OTP portions within authentication request
err Failure error code. If authentication fails (ret attribute value is n), this
attribute provides any of the following codes (for latest updates on error codes,
see https://developer.uidai.gov.in/site/api_err):
o 100 Pi (basic) attributes of demographic data did not match.
o 200 Pa (address) attributes of demographic data did not match
o 300 Biometric data did not match
UIDAI, 2011-2014
http://uidai.gov.in/
Page 30 of 37
Version 1.6
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
UIDAI, 2011-2014
http://uidai.gov.in/
Page 31 of 37
Version 1.6
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
UIDAI, 2011-2014
http://uidai.gov.in/
Page 32 of 37
Version 1.6
4.
4.1
UIDAI, 2011-2014
http://uidai.gov.in/
Page 33 of 37
Version 1.6
4.2
Authentication API supports using registered devices for biometric capture. Registered
devices specification ensures biometrics data between device and host is encrypted and
devices are uniquely identified.
From this API perspective, there are only two fundamental differences:
1. Biometric input must be obtained using startCapture() function which returns
encrypted FMR/FIR/IIR block
a. PID ts must be passed to this function as input
b. This encrypted biometric record can directly be used within bio element
of the PID block
2. Instead of using public as the tid value, when using registered device, tid
must be obtained from the device by calling getTid() function
Details about the registered devices are available in specification document published at
http://uidai.gov.in/images/aadhaar_registered_devices_1_0.pdf
4.3
As an advanced feature, this revision of the API version also supports a scheme called
Synchronized Session Key. This allows session key to be sent in the beginning of the
session and subsequent keys not to be sent for up to expiry of the session. At a high
level, logic is as follows:
1. Authentication client generates an AES session key, generates a unique session
identifier (key identifier) and sends the authentication request along with
session key encrypted with PKI. Lets call it seed key.
2. For subsequent transactions within the maximum session expiry time (4 hours),
authentication client does the following:
a. Generate a new random number (CSPRNG) and generate a new AES key
using the seed session key and this random number
b. Send the authentication request along with the random number and key
identifier without actually sending new session key
3. When seed session key expires (either 4 hours have passed since original session
key was sent or server sends a 504 error), start with step 1.
4.4
Protocol Buffers are a way of encoding structured data in an efficient yet extensible
format. Google uses Protocol Buffers for almost all of its internal RPC protocols and file
UIDAI, 2011-2014
http://uidai.gov.in/
Page 34 of 37
Version 1.6
4.5
Authentication Audits
Aadhaar authentication will record all the authentication requests and their responses
for audit purposes. By providing the Aadhaar number and authentication response code
(code attribute in AuthRes), AUAs can request UIDAI to confirm the result of an
authentication and authentication factors that were presented in that authentication
request. UIDAI policy will determine how long these audits are maintained within CIDR.
All authentication responses are digitally signed by UIDAI and AUAs are recommended
to validate the response integrity the keep track of these for audit purposes. In addition,
attributes ts, info within the API response can be used to verify if it the request was
indeed for a particular Aadhaar number, if the request indeed had a biometric factor,
when was the authentication done, etc. Such self verifiability of the authentication
response allows 3rd party applications to trust and electronically verify the digitally
signed response quite similar to that of an offline trust establishment against a gazetted
officer signed paper.
UIDAI, 2011-2014
http://uidai.gov.in/
Page 35 of 37
Version 1.6
5.
Appendix
5.1
Related Publications
http://uidai.gov.in/UID_PDF/Committees/UID_D
DSVP_Committee_Report_v1.0.pdf
Biometric Standards
http://uidai.gov.in/UID_PDF/Committees/Biome
trics_Standards_Committee_report.pdf
http://uidai.gov.in/UID_PDF/Working_Papers/A
adhaar_ABIS_API.pdf
ANXI X3.92
ANSI X9.24
ANSI X9.42
ANSI X9.52
ISO 9564
ISO 10118
ISO 11770
ISO 18033
Biometric standards
ISO_8601
XML Signature
http://www.w3.org/TR/xmldsig-core/
http://egovstandards.gov.in/standardsandFrame
work/metadata-and-datastandards/MDDS_Standard_release_version_1.0__
Dec_24_2k9.pdf
http://code.google.com/p/protobuf/
ISO 6709
UIDAI, 2011-2014
http://uidai.gov.in/
Page 36 of 37
Version 1.6
5.2
Old (1.5)
PID block is always XML
Txn attribute was optional
Session Key is always sent
Meta element was inside PID
block
Meta element was optional
---
New (1.6)
Added support for binary Protobuf format
Txn attribute made mandatory to ensure transactions are
correlated and managed across systems well
Allows advanced use case where session key is synchronized
Moved Meta outside PID block to allow AUAs to validate them, log
them, and use it in report
Meta element and its attributes made mandatory
Meta element structure changed to accommodate geo location,
public IP address of the device, and a unique device code
Additional error codes added
UIDAI, 2011-2014
http://uidai.gov.in/
Page 37 of 37