{ "info": { "author": "Piper Merriam", "author_email": "pipermerriam@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "Ethereum Keyfile\n================\n\nA library for handling the encrypted keyfiles used to store ethereum\nprivate keys\n\n This library and repository was previously located at\n https://github.com/pipermerriam/ethereum-keyfile. It was transferred\n to the Ethereum foundation github in November 2017 and renamed to\n ``eth-keyfile``. The PyPi package was also renamed from\n ``ethereum-keyfile`` to \\`eth-keyfile.\n\nInstallation\n------------\n\n.. code:: sh\n\n pip install eth-keyfile\n\nDevelopment\n-----------\n\n.. code:: sh\n\n pip install -e . -r requirements-dev.txt\n\nRunning the tests\n~~~~~~~~~~~~~~~~~\n\nYou can run the tests with:\n\n.. code:: sh\n\n py.test tests\n\nOr you can install ``tox`` to run the full test suite.\n\nReleasing\n~~~~~~~~~\n\nPandoc is required for transforming the markdown README to the proper\nformat to render correctly on pypi.\n\nFor Debian-like systems:\n\n::\n\n apt install pandoc\n\nOr on OSX:\n\n.. code:: sh\n\n brew install pandoc\n\nTo release a new version:\n\n.. code:: sh\n\n make release bump=$$VERSION_PART_TO_BUMP$$\n\nHow to bumpversion\n^^^^^^^^^^^^^^^^^^\n\nThe version format for this repo is ``{major}.{minor}.{patch}`` for\nstable, and ``{major}.{minor}.{patch}-{stage}.{devnum}`` for unstable\n(``stage`` can be alpha or beta).\n\nTo issue the next version in line, specify which part to bump, like\n``make release bump=minor`` or ``make release bump=devnum``.\n\nIf you are in a beta version, ``make release bump=stage`` will switch to\na stable.\n\nTo issue an unstable version when the current version is stable, specify\nthe new version explicitly, like\n``make release bump=\"--new-version 2.0.0-alpha.1 devnum\"``\n\nDocumentation\n-------------\n\n``eth_keyfile.load_keyfile(path_or_file_obj) --> keyfile_json``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTakes either a filesystem path represented as a string or a file object\nand returns the parsed keyfile json as a python dictionary.\n\n.. code:: python\n\n >>> from eth_keyfile import load_keyfile\n >>> load_keyfile('path/to-my-keystore/keystore.json')\n {\n \"crypto\" : {\n \"cipher\" : \"aes-128-ctr\",\n \"cipherparams\" : {\n \"iv\" : \"6087dab2f9fdbbfaddc31a909735c1e6\"\n },\n \"ciphertext\" : \"5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46\",\n \"kdf\" : \"pbkdf2\",\n \"kdfparams\" : {\n \"c\" : 262144,\n \"dklen\" : 32,\n \"prf\" : \"hmac-sha256\",\n \"salt\" : \"ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd\"\n },\n \"mac\" : \"517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2\"\n },\n \"id\" : \"3198bc9c-6672-5ab3-d995-4942343ae5b6\",\n \"version\" : 3\n }\n\n``eth_keyfile.create_keyfile_json(private_key, password, kdf=\"pbkdf2\", work_factor=None) --> keyfile_json``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTakes the following parameters:\n\n- ``private_key``: A bytestring of length 32\n- ``password``: A bytestring which will be the password that can be\n used to decrypt the resulting keyfile.\n- ``kdf``: The key derivation function. Allowed values are ``pbkdf2``\n and ``scrypt``. By default, ``pbkdf2`` will be used.\n- ``work_factor``: The work factor which will be used for the given key\n derivation function. By default ``1000000`` will be used for\n ``pbkdf2`` and ``262144`` for ``scrypt``.\n\nReturns the keyfile json as a python dictionary.\n\n.. code:: python\n\n >>> private_key = b'\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01'\n >>> create_keyfile_json(private_key, b'foo')\n {\n \"address\" : \"1a642f0e3c3af545e7acbd38b07251b3990914f1\",\n \"crypto\" : {\n \"cipher\" : \"aes-128-ctr\",\n \"cipherparams\" : {\n \"iv\" : \"6087dab2f9fdbbfaddc31a909735c1e6\"\n },\n \"ciphertext\" : \"5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46\",\n \"kdf\" : \"pbkdf2\",\n \"kdfparams\" : {\n \"c\" : 262144,\n \"dklen\" : 32,\n \"prf\" : \"hmac-sha256\",\n \"salt\" : \"ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd\"\n },\n \"mac\" : \"517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2\"\n },\n \"id\" : \"3198bc9c-6672-5ab3-d995-4942343ae5b6\",\n \"version\" : 3\n }\n\n``eth_keyfile.decode_keyfile_json(keyfile_json, password) --> private_key``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTakes the keyfile json as a python dictionary and the password for the\nkeyfile, returning the decoded private key.\n\n.. code:: python\n\n >>> keyfile_json = {\n ... \"crypto\" : {\n ... \"cipher\" : \"aes-128-ctr\",\n ... \"cipherparams\" : {\n ... \"iv\" : \"6087dab2f9fdbbfaddc31a909735c1e6\"\n ... },\n ... \"ciphertext\" : \"5318b4d5bcd28de64ee5559e671353e16f075ecae9f99c7a79a38af5f869aa46\",\n ... \"kdf\" : \"pbkdf2\",\n ... \"kdfparams\" : {\n ... \"c\" : 262144,\n ... \"dklen\" : 32,\n ... \"prf\" : \"hmac-sha256\",\n ... \"salt\" : \"ae3cd4e7013836a3df6bd7241b12db061dbe2c6785853cce422d148a624ce0bd\"\n ... },\n ... \"mac\" : \"517ead924a9d0dc3124507e3393d175ce3ff7c1e96529c6c555ce9e51205e9b2\"\n ... },\n ... \"id\" : \"3198bc9c-6672-5ab3-d995-4942343ae5b6\",\n ... \"version\" : 3\n ... }\n >>> decode_keyfile_json(keyfile_json, b'foo')\n b'\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01'\n\n``eth_keyfile.extract_key_from_keyfile(path_or_file_obj, password) --> private_key``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTakes a filesystem path represented by a string or a file object and the\npassword for the keyfile. Returns the private key as a bytestring.\n\n.. code:: python\n\n >>> extract_key_from_keyfile('path/to-my-keystore/keyfile.json', b'foo')\n b'\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01\\x01'\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ethereum/eth-keyfile", "keywords": "ethereum", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "eth-keyfile", "package_url": "https://pypi.org/project/eth-keyfile/", "platform": "", "project_url": "https://pypi.org/project/eth-keyfile/", "project_urls": { "Homepage": "https://github.com/ethereum/eth-keyfile" }, "release_url": "https://pypi.org/project/eth-keyfile/0.5.1/", "requires_dist": null, "requires_python": "", "summary": "A library for handling the encrypted keyfiles used to store ethereum private keys.", "version": "0.5.1" }, "last_serial": 3877162, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "169a34c3be4a1c80994373daaab2030f", "sha256": "9a2462edae43e3b2fdd778170b62db51cfc134663b1a6ea99e750f66c8bb5042" }, "downloads": -1, "filename": "eth_keyfile-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "169a34c3be4a1c80994373daaab2030f", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7974, "upload_time": "2017-11-27T23:49:59", "url": "https://files.pythonhosted.org/packages/5c/70/4cbb4244ed22832697f4fed8f2a1907e0e0696cf2457a4f104a93f0041f1/eth_keyfile-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eabcc7f6ca190bdef17f78b43211eb7d", "sha256": "dafae78ea36d51a8452a0ca49ee90c7031cb115dcfb1d942c0db3fc923db6e1d" }, "downloads": -1, "filename": "eth-keyfile-0.4.0.tar.gz", "has_sig": false, "md5_digest": "eabcc7f6ca190bdef17f78b43211eb7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6331, "upload_time": "2017-11-27T23:49:57", "url": "https://files.pythonhosted.org/packages/db/0d/b84bce70fe79c3ca951d010e6d9824af5ea0ac6832aebaa19cdbcefeb321/eth-keyfile-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "00b3d601499203f52585326b2f185835", "sha256": "585d326ea6fe20afa6c8ec232613a285de7e3d722643107a85a13963b15a1fc6" }, "downloads": -1, "filename": "eth_keyfile-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "00b3d601499203f52585326b2f185835", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8264, "upload_time": "2017-12-22T19:38:14", "url": "https://files.pythonhosted.org/packages/56/37/e66dd2f779f4359f425102183e5e0e7f76f46562bd54826bf07d17beea29/eth_keyfile-0.4.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b97f3db25abe65c35c54444ee86b8994", "sha256": "512b331ca97a4fb0a252a320b85c97c1b675c25026be4e9bc287ca9839828cf8" }, "downloads": -1, "filename": "eth-keyfile-0.4.1.tar.gz", "has_sig": false, "md5_digest": "b97f3db25abe65c35c54444ee86b8994", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6511, "upload_time": "2017-12-22T19:38:13", "url": "https://files.pythonhosted.org/packages/41/2c/79d05247b0eef5c455d3ce4b3932b55930edde826cb4021af170f336cdf9/eth-keyfile-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "515efa2d8aa0bd278abde123de9db3ca", "sha256": "13155e3616b065a924c703519e61eb29f69f0f127f1785d66073bb77c4093a6d" }, "downloads": -1, "filename": "eth_keyfile-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "515efa2d8aa0bd278abde123de9db3ca", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8228, "upload_time": "2018-02-01T22:31:41", "url": "https://files.pythonhosted.org/packages/ca/36/e776449bf67727dcc6c0e658773dbcce181eeeabd5e65538a700ed54ce0b/eth_keyfile-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a9be94bfa1f4709269437c472e1817a", "sha256": "a84ac460becf1dc55d97324a1b45756163b18af98343fc08f7419e71c8189102" }, "downloads": -1, "filename": "eth-keyfile-0.5.0.tar.gz", "has_sig": false, "md5_digest": "5a9be94bfa1f4709269437c472e1817a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6525, "upload_time": "2018-02-01T22:31:40", "url": "https://files.pythonhosted.org/packages/de/fd/5080a4fadc6074d08d5d6301b15dfee0133db2132392675376872cfde41d/eth-keyfile-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "65f97306913e2cae7b1f396c80f77ca8", "sha256": "70d734af17efdf929a90bb95375f43522be4ed80c3b9e0a8bca575fb11cd1159" }, "downloads": -1, "filename": "eth_keyfile-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "65f97306913e2cae7b1f396c80f77ca8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8350, "upload_time": "2018-02-13T17:59:01", "url": "https://files.pythonhosted.org/packages/eb/a5/3615d100b62fbf20fe5d5c0d1d4d7326eac861d260b0cd2a36af2bf8ccb1/eth_keyfile-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c294893451acf9755251964d6f00f33f", "sha256": "939540efb503380bc30d926833e6a12b22c6750de80feef3720d79e5a79de47d" }, "downloads": -1, "filename": "eth-keyfile-0.5.1.tar.gz", "has_sig": false, "md5_digest": "c294893451acf9755251964d6f00f33f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6607, "upload_time": "2018-02-13T17:58:55", "url": "https://files.pythonhosted.org/packages/0b/fe/e2e29b7a715e8ee5fdf51b7394dcea2fe46e6b4be20a037ef0963d867666/eth-keyfile-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65f97306913e2cae7b1f396c80f77ca8", "sha256": "70d734af17efdf929a90bb95375f43522be4ed80c3b9e0a8bca575fb11cd1159" }, "downloads": -1, "filename": "eth_keyfile-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "65f97306913e2cae7b1f396c80f77ca8", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 8350, "upload_time": "2018-02-13T17:59:01", "url": "https://files.pythonhosted.org/packages/eb/a5/3615d100b62fbf20fe5d5c0d1d4d7326eac861d260b0cd2a36af2bf8ccb1/eth_keyfile-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c294893451acf9755251964d6f00f33f", "sha256": "939540efb503380bc30d926833e6a12b22c6750de80feef3720d79e5a79de47d" }, "downloads": -1, "filename": "eth-keyfile-0.5.1.tar.gz", "has_sig": false, "md5_digest": "c294893451acf9755251964d6f00f33f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6607, "upload_time": "2018-02-13T17:58:55", "url": "https://files.pythonhosted.org/packages/0b/fe/e2e29b7a715e8ee5fdf51b7394dcea2fe46e6b4be20a037ef0963d867666/eth-keyfile-0.5.1.tar.gz" } ] }