Simple APDU commands for FTCOS PKI using pyscard
Pyscard is the python smartcard library you need to execute this examples
- Download latest
- Download and install python dependencies
- Unpackage and install pyscard:
setup.py install
~$ sudo apt-get install python-pyscard
- GET CHALLENGE
- SELECT FILE
~$ ./sample_getChallenge.py insert a card (SIM card if possible) within 10s connecting to C3PO LTC31 (80060327) 00 00 > 00 84 00 00 FF < [] 67 0 Incorrect length > 00 84 11 00 08 < [] 6A 86 Invalid P1/P2 > FF 84 00 00 08 < [] 6E 0 Invalid CLA > 00 84 00 00 08 < BB A2 E1 F1 AC 50 23 09 90 0 Challenge is BB A2 E1 F1 AC 50 23 09 disconnecting from C3PO LTC31 (80060327) 00 00 ~$
Complete the code:
# TODO: # 62 83 Invalid selected file # 69 85 Insufficient condition for using the command # 6A 81 Not supported function # 6A 82 File not found # 6A 86 Invalid P1/P2 # 6E 00 Invalid CLA