Communication with Turkey Identity Card (TCKK) for e-Devlet Authentication
Accessing e-Devlet with the Turkish Identity Card (TCKK) requires a computer running a JAVA application and a smart card reader. It would be nice if it could be as simple as a bank security token.
Introduction
In this research, we need to figure out the following:
- What information are involved in e-Devlet authentication
- Data flows and commands for smart card communication
- Encryption and encoding algorithms
Analysis
Software
e-Devlet JNLP shortcut
The download link from the e-Devlet website is pointing to the following URL:
1 | https://cdn.e-devlet.gov.tr/downloads/e-kimlik/edevlet-ekimlik.jnlp |
The Java Network Launch Protocol (JNLP) enables an application to be launched on a client desktop by using resources that are hosted on a remote web server.
e-Kimlik JAR
From the JNLP shortcut contents can piece together the real running JAR application hosting URL:
1 | https://static.turkiye.gov.tr/downloads/e-kimlik/ekimlik.jar |
Authorisation Process
First, need to enter the T.C. Kimlik No
on the e-Devlet website to generate a transaction code.
The JAR application will request a challenge related to the transaction code based on the Identity No.
1 | // tr.gov.turkiye.ekds.manager.LogicManager |
1 | // tr.gov.tubitak.bilgem.uekae.ekds.tckk.api.v2_5.operational.service.CertificateServiceBase |
1 | // tr.gov.tubitak.bilgem.uekae.ekds.tckk.api.v2_5.operational.communication.apdu.CertificateReader |
1 | // tr.gov.tubitak.bilgem.uekae.ekds.tckk.api.v2_5.operational.communication.apdu.TCKKCommander |
1 | // tr.gov.tubitak.bilgem.uekae.akis.akisCIF.commands.CommandsV20 |
Send a POST request to the API to get a challenge.