This is a little project to facilitate the development of the Smartcards assignment for the subject "Identification and Authentication".
Written by Foo-Manroot - 2019
This is a standalone script file (though it may be advisable to split it into smaller modules...) for Python 3 and has the following requirements (you may want to create a virtualenv
for it):
- pyCryptoDome, for the encryption calculations
- pyscard, to interact with the smartcard. This module needs also the pcscd server to work. Also, when installing with
pip
you may needlibpcsclite-dev
to compile.
It has been tested to be working correctly in:
- Arch Linux
- Ubuntu 16.04
- Windows 10
It's pretty simple: run ./crypto
and read the instructions.
If you have any doubt on how to use certain commands, execute help <command>
and a message will clarify what do you have to do with it.
For the moment, there are two types of messages:
-
The ones starting with
ll_
(stands for low level) were the ones we developed at the start of the assignment, when we were sending the raw messages by hand. These commands don't interact with the reader and simply performs the needed calculations to send the appropriate message. -
The rest of the commands usually will interact in some way or another with the smartcard reader. If there's none, the command will fail
There are three different packages with their own modules:
- cli: Everything that has to do with the CLI shell
- crypto: Cryptographic functions, to be able to send authenticated commands to the Smart Card
- scard: Functions related to the communication with the Smart Card
From the main script, main.py
, these different modules are called and their functionality is used to create a shell with which we can exchange data with the WG10 Smart Card.