Back

Details of the Digital Signature of E-Aadhaar

Some research notes about the digital signature of e-aadhaar

Today I learnt in the FSCI group chat that there are shops in India where you can pay some money for someone to open the e-aadhaar in an Adobe Acrobat and print it out with a checkmark that says “Signature Valid” instead of the yellow question mark that it comes with. This is a joke, but we are the land of bank.in.

I tried to figure out whether I can do this with Okular.

Background

When you open the document with Okular (or even libreoffice draw), the signature panel opens up and you can see who’s signed it. In my case it said “DS Unique Identification Authority of India 06” with the organization name “UNIQUE IDENTIFICATION AUTHORITY OF INDIA” and when I looked at the certificate, it was issued by “(n)Code Solutions Sub-CA for DSC 2022”, with the organization name “Gujarat Narmada Valley Fertilizers and Chemicals Limited”.

Gujarat Narmada Valley Fertilizers and Chemicals Limited (GNFC) is a company in Gujarat which had an electronics division before 2000, and ventured into IT under a “PKI project” in early 2000s. This became their division called (n)Code solutions as they got the license from Controller of Certifying Authorities (CCA) (which was established through IT Act 2000).

Root inclusion situation

CCA has a root certificate which it had applied for inclusion in Mozilla in 2010. But it was never added, pending inclusion of all the subsidiary CAs. The list included, at that time:

  • NIC
  • SafeScrypt
  • IDRBT
  • TCS
  • MTNL
  • nCode
  • eMudhra

In 2014, NIC issued without authorization certificates for some google domains which google discovered. In any case, NIC is never getting included in Mozilla.

You’ll also notice in that list our recent fame eMudhra, which got added in 2019 and is the only Indian CA that Firefox trusts (for now).

But what is interesting to note is that Microsoft® directly trusts CCA India root (which could be the reason why Adobe on Windows has no problem validating the signature in e-aadhaar).

What can we do in linux

You can download the CCA root cert from https://cca.gov.in/root_certificate.html

You can download the (n)Code cert from https://www.ncodesolutions.com/repository.php (and unrar it!)

Okular by default uses Firefox’s NSS DB. In Settings -> Configure Okular -> PDF -> Certificate Database, you can set a custom location. Set this to a new folder, say /tmp/nssdb.

Now, we need to create a trust db here. That can be done with certutil -N -d /tmp/nssdb. This creates a New nss db in the directory /tmp/nssdb.

Next we have to add the downloaded certificate to this db with the right trustarg. certutil -A -n ncode -t "C,C,C" -i ~/Downloads/ncodeca22.cer -d /tmp/nssdb. This will Add with the name ncode and trust of Trusted CA for SSL, Email and Object Signing the input file from Downloads/ncodeca22.cer.

With this in place, when you open an e-aadhaar in Okular, it will show “This document is digitally signed” as a popup, and when you open it you’ll see “✔️ Rev. 1: Signed by DS … The signature is cryptographically valid. Certificate is Trusted ….”

But the yellow question mark will remain.

The question mark that needs to be questioned

The question mark should not have been there at all. It was an idea floated by Adobe in early 2000s to allow the document to show different content based on signature status using different layers. But they realized that this will create the wrong lesson in people’s mind where they start associating checkmarks (or any such indications) in a document to it being a valid document. Remember anyone can create any document with any picture in it, including that of checkmarks.

Read more here: https://github.com/pdf-association/pdf-issues/discussions/734

All good PDF readers show digital signature information completely outside the document (like Okular does). But Adobe retains its bad behavior. And UIDAI uses the bad behavior. And Adobe has a page on its website about the checkmark in aadhaar. And UIDAI asks people to use Adobe to verify on the download page and on FAQs.

And like the meaningless password you have to enter to open the e-aadhaar you just downloaded after entering an OTP, you also have a meaningless question mark in your e-aadhaar.

Some resources that were helpful