_ _ _____ _ _____ _
| | | | / ____| | | / ____| | |
| | | | _____| (___ _ __ ___ __ _ _ __| |_| | __ _ _ __ __| |
| | | | |______\___ \| '_ ` _ \ / _` | '__| __| | / _` | '__/ _` |
| |____| |____ ____) | | | | | | (_| | | | |_| |___| (_| | | | (_| |
|______|______| |_____/|_| |_| |_|\__,_|_| \__|\_____\__,_|_| \__,_|
Authors: Chad Spensky (chad.spensky@ll.mit.edu)
Hongyi Hu (hongyi.hu@ll.mit.edu)
Contents
========
- examples/ Some example scripts on how to use the library to interact
with various smartcards
- docs/ Contains some useful documents when working with smart cards
that define some of the APDUs and RIDs.
Install
=======
- Install `pyDes <https://pypi.python.org/pypi/pyDes/>`__ python
library
- Install `pyscard <http://pyscard.sourceforge.net/>`__ python library
- Install PC/SC >$ sudo apt-get install pcsc-tools pcscd
- To install all of these just run: >$ ./install\_dependencies.sh
Usage
=====
- For developing your own smart card application using llsmartcard, see
template.py
- See ``examples/``
Certificates
============
This section discusses how to work with the certificates on the CAC.
- Extract Certificates python cac\_crypto.py -x test
- Working with certs (Referenced from
`here <http://www.devco.net/archives/2006/02/13/public_-_private_key_encryption_using_openssl.php>`__).
- Encrypt >$ openssl pkeyutl -encrypt -in -pubin -inkey [input public
key] -out [output file]
- Extract Public Key >$ openssl x509 -inform DER -pubkey -in [input
certificate] > output.key
- Example using certs:
$ echo "Hello World!" > input.txt
$ python cac\_crypto.py -E -k test/cac/cac\_pki\_enc.pub -i
input.txt -o input\_encrypted.ssl
$ python cac\_crypto.py -D -i input\_encrypted.ssl -c KEY\_PKI\_ENC
-o input\_decrypted.txt -p 77777777
Notes
=====
- Certificates are returned in gzipped form. > $ gunzip [cert.gz]
- Certificates are in DER form > $ openssl x509 -inform DER -in [cert]
> $ openssl x509 -issuer -email -startdate -enddate -inform DER -in
[cert] > $ openssl x509 -inform DER -noout -text -in [cert]
Disclaimer
==========
.. raw:: html
<p align="center">
This work is sponsored by the Defense Information Systems Agency under
Air Force Contract #FA8721-05-C-0002. Opinions, interpretations,
conclusions and recommendations are those of the author and are not
necessarily endorsed by the United States Government. © 2015
Massachusetts Institute of Technology
.. raw:: html
</p>
Metadata
Release files for llsmartcard-ph4 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llsmartcard-ph4-1.1.1.tar.gz | 22.5 kB | Without provenance | Details for llsmartcard-ph4-1.1.1.tar.gz |
Release files / llsmartcard-ph4-1.1.1.tar.gz
| Download URL | llsmartcard-ph4-1.1.1.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2141e2a428f9df9e45b15beeaad2bc8b87fbe2e1e965d69ddf5105e7f5a7ba7c
|
|
BLAKE2b-256 checksum How to use checksums |
774173e1f4227a3de95fc10d95848716917b9985ebc0cdcbe24f5d9db227a47b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for llsmartcard-ph4 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.