易于与智能卡交互的模块。
llsmartcard-ph4的Python项目详细描述
::
_ _ _____ _ _____ _
| | | | / ____| | | / ____| | |
| | | | _____| (___ _ __ ___ __ _ _ __| |_| | __ _ _ __ __| |
| | | | |______\___ \| '_ ` _ \ / _` | '__| __| | / _` | '__/ _` |
| |____| |____ ____) | | | | | | (_| | | | |_| |___| (_| | | | (_| |
|______|______| |_____/|_| |_| |_|\__,_|_| \__|\_____\__,_|_| \__,_|
作者:Chad Spensky(chad.spensky@ll.mit.edu)
Hongyi Hu(Hongyi.hu@ll.mit.edu)
内容
===
-示例/一些关于如何使用库与各种智能卡交互的示例脚本使用定义了一些apdu和rid的智能卡
install
==
-安装“pydes<;https://pypi.python.org/pypi/pydes/>;`\python
library
-安装“pyscard<;http://pyscard.sourceforge.net/>;`\python library
-安装PC/SC>;$sudo apt get install pcsc tools pcscd
-要安装所有这些,只需运行:>;$。/安装依赖项。sh
使用CAC上的证书。
-extract certificates python cac\u crypto.py-x test
-working with certs(参考http://www.devco.net/archives/2006/02/13/public\u private\u key\u encryption\u using\u openssl.php>;``uu)。
-encrypt>;$openssl pkeyutl-encrypt-in-pubin-in key[input public
key]-out[output file]
-提取公钥>;$openssl x509-inform der-pubkey-in[input
证书]>;output.key
-使用证书的示例:
$echo“Hello World!”&输入.txt
$python cac-cac-crypto.py-e-k test/cac/cac-p k i-enc.pub-i
input.txt-o输入加密.ssl
$python cac-crypto.pyt-d-i输入加密.ssl-c密钥加密.pki-pki-pki-pki-encc
-o输入解密.txt-p 7777777777
<
<
=
==
==
<<<
<
=
=
<<<
-证书以gzip格式返回。>;$gunzip[cert.gz]
-证书采用订单形式>;$openssl x509-通知订单-在[cert]中
>;$openssl x509-颁发者-电子邮件-开始日期-结束日期-通知订单-在
[cert]>;$openssl x509-通知订单-noout-文本-在[cert]中
原始:html
<;p align=“center”>;
这项工作由国防信息系统局根据空军合同FA8721-05-C-0002赞助。意见、解释、结论和建议均为作者的意见、解释和建议,并不一定得到美国政府的认可。版权所有2015年麻省理工学院原始:html
<;p>;
_ _ _____ _ _____ _
| | | | / ____| | | / ____| | |
| | | | _____| (___ _ __ ___ __ _ _ __| |_| | __ _ _ __ __| |
| | | | |______\___ \| '_ ` _ \ / _` | '__| __| | / _` | '__/ _` |
| |____| |____ ____) | | | | | | (_| | | | |_| |___| (_| | | | (_| |
|______|______| |_____/|_| |_| |_|\__,_|_| \__|\_____\__,_|_| \__,_|
作者:Chad Spensky(chad.spensky@ll.mit.edu)
Hongyi Hu(Hongyi.hu@ll.mit.edu)
内容
===
-示例/一些关于如何使用库与各种智能卡交互的示例脚本使用定义了一些apdu和rid的智能卡
install
==
-安装“pydes<;https://pypi.python.org/pypi/pydes/>;`\python
library
-安装“pyscard<;http://pyscard.sourceforge.net/>;`\python library
-安装PC/SC>;$sudo apt get install pcsc tools pcscd
-要安装所有这些,只需运行:>;$。/安装依赖项。sh
使用CAC上的证书。
-extract certificates python cac\u crypto.py-x test
-working with certs(参考http://www.devco.net/archives/2006/02/13/public\u private\u key\u encryption\u using\u openssl.php>;``uu)。
-encrypt>;$openssl pkeyutl-encrypt-in-pubin-in key[input public
key]-out[output file]
-提取公钥>;$openssl x509-inform der-pubkey-in[input
证书]>;output.key
-使用证书的示例:
$echo“Hello World!”&输入.txt
$python cac-cac-crypto.py-e-k test/cac/cac-p k i-enc.pub-i
input.txt-o输入加密.ssl
$python cac-crypto.pyt-d-i输入加密.ssl-c密钥加密.pki-pki-pki-pki-encc
-o输入解密.txt-p 7777777777
<
<
=
==
==
<<<
<
=
=
<<<
-证书以gzip格式返回。>;$gunzip[cert.gz]
-证书采用订单形式>;$openssl x509-通知订单-在[cert]中
>;$openssl x509-颁发者-电子邮件-开始日期-结束日期-通知订单-在
[cert]>;$openssl x509-通知订单-noout-文本-在[cert]中
原始:html
<;p align=“center”>;
这项工作由国防信息系统局根据空军合同FA8721-05-C-0002赞助。意见、解释、结论和建议均为作者的意见、解释和建议,并不一定得到美国政府的认可。版权所有2015年麻省理工学院原始:html
<;p>;