{ "info": { "author": "Kobus Grobler", "author_email": "kobus.grobler@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "## python-libehsm is a Python wrapper for the ellipticSecure PKCS11 shared library\n\nNote that while the wrapper does export some PKCS#11 helper \nfunctions it does so only partially - there are other wrappers \navailable to interface with PKCS#11.\n\nThe focus of this wrapper is to export the BIP32/Bitcoin specific functions.\n\n## Installation\n\nDownload and install the native shared library for your platform here: [https://ellipticsecure.com/downloads/](https://ellipticsecure.com/downloads/)\n\npip install python-libehsm\n\n\n## Example\n\nSigning a transaction hash with a BIP32 (Bitcoin etc.) derived key stored on\na MIRkey or eHSM device:\n\n```python\nimport ehsm\n\nmirkey = ehsm.load_ehsm()\n \n# Get the available device slots\nslots = mirkey.enumerate_slots()\n\nif len(slots) > 0: \n # Use the first available slot\n slot = slots[0]\n \n # Initialize the library\n mirkey.init()\n try:\n session = mirkey.get_logged_in_rw_session(slot, b\"testsu\")\n found = mirkey.bip32_has_root_key(session)\n if found:\n hash = bytes(32)\n # list of integers representing a bip32 path to the derived key\n # \n # ie. this is \"m/0\", \"m\" would be []\n indexes = [0] \n sig = mirkey.bip32_sign_data(session, hash, indexes)\n finally:\n mirkey.finalize()\nelse:\n print \"No devices found\"\n \n```\n\nPlease see the test cases for more usage examples.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ellipticSecure/python-libehsm", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ehsm", "package_url": "https://pypi.org/project/ehsm/", "platform": "", "project_url": "https://pypi.org/project/ehsm/", "project_urls": { "Homepage": "https://github.com/ellipticSecure/python-libehsm" }, "release_url": "https://pypi.org/project/ehsm/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python bindings for the ellipticSecure PKCS11 shared library", "version": "1.0.0" }, "last_serial": 5458180, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "48268f8b541e665a65c8b3342548ac88", "sha256": "f5778e614a0135da171476c777b112af90e1107894f4e76fb21773ee4c7f5039" }, "downloads": -1, "filename": "ehsm-1.0.0.tar.gz", "has_sig": false, "md5_digest": "48268f8b541e665a65c8b3342548ac88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7972, "upload_time": "2019-06-27T18:07:02", "url": "https://files.pythonhosted.org/packages/34/2b/304e4b69f32866fa479ae726952c86f7770b8856621a0b8763683830a876/ehsm-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "48268f8b541e665a65c8b3342548ac88", "sha256": "f5778e614a0135da171476c777b112af90e1107894f4e76fb21773ee4c7f5039" }, "downloads": -1, "filename": "ehsm-1.0.0.tar.gz", "has_sig": false, "md5_digest": "48268f8b541e665a65c8b3342548ac88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7972, "upload_time": "2019-06-27T18:07:02", "url": "https://files.pythonhosted.org/packages/34/2b/304e4b69f32866fa479ae726952c86f7770b8856621a0b8763683830a876/ehsm-1.0.0.tar.gz" } ] }