{ "info": { "author": "Roger Gammans", "author_email": "rgammans@gammascience.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Security", "Topic :: Utilities" ], "description": "Smartcard object Wrappers\n=========================\n\nThis module provide cryptography compatible proxy class for using \na crypto smartcard , (such as yubi key, or PKCS#11 token) to\nprocess the actually cryptographic workload.\n\nThese are normally considered to be 'secure' tokens and the private\nkey they are normally configured so the private key is not extractable\nfrom the token's hardware. As a result you need to request the token\nto do any cryptographic operation for which you would normally use the\nprivate key.\n\nIn this module you will find a new abstraction of cryptography's \n`RSAPrivateKey` class called `RSAPrivateToken` which instead using\none the normal cryptography provided backend uses an hardware token \ndirectly.\n\nCurrently this means the PKCS#11 API, as provided on Linux by the\nopensc-pkcs11 [1]_ package. TokenCrypt uses the PyKCS11 library\nto wrap the opensc PKCS#11 library and needs a environment variable\nset so the library can be found on debian that would be\n\n.. code:: shell\n\n export PYKCS11LIB=/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so\n\n\nA use case of this library would be to use a yubikey to provide Oauth\nidentity services to python applications which use the requests-Oauth2 \nlibrary. This is quite common if you are accessing 3rd party APIs to\ncloud service systems.\n\nIn this case a `RSAPrivateToken` can be provided to the library in the place\nof the usual `RSAPrivateKey`. \n\nMany library examples show providing an PEM encoded string, but they also\nwork with a subclass of cryptography's `RSAPrivateKey`, as shown below.\n\n\nExample\n-------\n\n.. code:: python\n\n import TokenCrypt\n from ThierAPI import APIConection, PrivateCredentials # Not a working example.\n\n rsa_key = TokenCrypt.RSAPrivateToken(slot = 0 , key = 0, pin = '123456' )\n with rsa_key:\n credentials = PrivateCredentials(args.consumer_key, rsa_key)\n api = APIConection(credentials)\n\n do_something_with(api)\n\n\n\n.. [1] This is the package name in debian Stretch, Buster, Bullseye(so far), your\n distribution may vary.\n\n\nCurrent Status\n--------------\n\nThis is an initial proof of concept release which is design to have enough\ncode to support working as an Oauth client. As a result the only action currently\nimplemented on the key is signing.\n\n\nBut there is a lot todo, Pull requests and bug reports welcome.\n\nTODO\n----\n\n - Implement `RSAPublicToken` .\n - Dynamically select the signing mechanism based to the provided \n padding and hash.\n - Implement decrypt.\n - Implement certificate extraction.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rgammans/TokenCrypt", "keywords": "pkcs11 security cryptography", "license": "", "maintainer": "", "maintainer_email": "", "name": "tokencrypt", "package_url": "https://pypi.org/project/tokencrypt/", "platform": "", "project_url": "https://pypi.org/project/tokencrypt/", "project_urls": { "Homepage": "https://github.com/rgammans/TokenCrypt" }, "release_url": "https://pypi.org/project/tokencrypt/0.1.2/", "requires_dist": [ "cryptography", "PyKCS11", "pipenv ; extra == 'dev'", "coverage ; extra == 'test'" ], "requires_python": ">3.6.0", "summary": "PKCS11 Keys classes for cryptography", "version": "0.1.2" }, "last_serial": 5560488, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "8298cd3b2523702636e6f9d0e00a12c7", "sha256": "b7b97e806c40e2bae9e671dbf4abe3a9f0561b5ceb1e84f77c76e8db1b6ab250" }, "downloads": -1, "filename": "tokencrypt-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8298cd3b2523702636e6f9d0e00a12c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6.0", "size": 4010, "upload_time": "2019-07-20T12:24:04", "url": "https://files.pythonhosted.org/packages/f7/b1/509a3ac03ec4914f47879cbc9b6ab4bf317be76f77db722f77d3183e7e4a/tokencrypt-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06744e4baa9010d78524fbe2494e2c58", "sha256": "e008280d58bf125dbdb3892b0cd18a203a769d889afdd346c4d7e177b8e8f0a5" }, "downloads": -1, "filename": "tokencrypt-0.1.2.tar.gz", "has_sig": false, "md5_digest": "06744e4baa9010d78524fbe2494e2c58", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 4035, "upload_time": "2019-07-20T12:24:06", "url": "https://files.pythonhosted.org/packages/70/48/7b901bbd4ae666258fb1bf5681bbc8e2bd6032c2a0e88ea3802cfda8359b/tokencrypt-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8298cd3b2523702636e6f9d0e00a12c7", "sha256": "b7b97e806c40e2bae9e671dbf4abe3a9f0561b5ceb1e84f77c76e8db1b6ab250" }, "downloads": -1, "filename": "tokencrypt-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8298cd3b2523702636e6f9d0e00a12c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6.0", "size": 4010, "upload_time": "2019-07-20T12:24:04", "url": "https://files.pythonhosted.org/packages/f7/b1/509a3ac03ec4914f47879cbc9b6ab4bf317be76f77db722f77d3183e7e4a/tokencrypt-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06744e4baa9010d78524fbe2494e2c58", "sha256": "e008280d58bf125dbdb3892b0cd18a203a769d889afdd346c4d7e177b8e8f0a5" }, "downloads": -1, "filename": "tokencrypt-0.1.2.tar.gz", "has_sig": false, "md5_digest": "06744e4baa9010d78524fbe2494e2c58", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6.0", "size": 4035, "upload_time": "2019-07-20T12:24:06", "url": "https://files.pythonhosted.org/packages/70/48/7b901bbd4ae666258fb1bf5681bbc8e2bd6032c2a0e88ea3802cfda8359b/tokencrypt-0.1.2.tar.gz" } ] }