{ "info": { "author": "Storj Labs", "author_email": "hello@storj.io", "bugtrack_url": null, "classifiers": [], "description": "File Encryptor\n==============\n\n|Build Status| |Coverage Status| |PyPI version|\n\nThis is a library used by MetaDisk to convergently encrypt and decrypt\nfiles. It contains helper methods to encrypt and decrypt files inline\n(without using extra space) and to stream decryption.\n\nInstallation\n------------\n\nYou can easily install ``file-encryptor`` using pip:\n\n::\n\n pip install file_encryptor\n\nUsage\n-----\n\nHere\u2019s an example to encrypt a file inline using convergent encryption:\n\n.. code:: python\n\n import file_encryptor.convergence\n\n key = convergence.encrypt_inline_file(\"/path/to/file\", None)\n\nYou can also specify a passphrase:\n\n.. code:: python\n\n import file_encryptor.convergence\n\n key = convergence.encrypt_inline_file(\"/path/to/file\", \"rainbow dinosaur secret\")\n\nTo decrypt a file inline, you need the key that was returned by the\nencrypt method:\n\n.. code:: python\n\n import file_encryptor.convergence\n\n key = convergence.encrypt_inline_file(\"/path/to/file\", \"rainbow dinosaur secret\")\n\n convergence.decrypt_inline_file(\"/path/to/file\", key)\n\nThe reason why you cannot use the passphrase directly is because the key\nis derived from both the passphrase and the SHA-256 of the original\nfile.\n\nFor streaming applications, you can decrypt a file with a generator:\n\n.. code:: python\n\n for chunk in convergence.decrypt_generator(\"/path/to/file\", key):\n do_something_with_chunk(chunk)\n\nCryptoconcerns\n--------------\n\nThe key generation mechanism is the following:\n\n.. code:: python\n\n key = HMAC-SHA256(passphrase, hex(SHA256(file-contents)))\n\nIf no passphrase is given, a default is used.\n\nThe file itself is encrypted using AES128-CTR, from pycrypto. We\u2019re not\nspecifying any IV, thinking that for convergent encryption that is the\nright thing to do.\n\nTesting\n-------\n\nTo run tests, execute the following command in the project root:\n\n::\n\n python setup.py test -a \"--doctest-modules --pep8 -v tests/\"\n\nTo run tests with detailed coverage output, execute:\n\n::\n\n coverage run setup.py test -a \"--doctest-modules --pep8 -v tests/\"\n coverage report -m --include=\"file_encryptor/*\"\n\n.. |Build Status| image:: https://travis-ci.org/Storj/file-encryptor.svg\n :target: https://travis-ci.org/Storj/file-encryptor\n.. |Coverage Status| image:: https://coveralls.io/repos/Storj/file-encryptor/badge.png?branch=master\n :target: https://coveralls.io/r/Storj/file-encryptor?branch=master\n.. |PyPI version| image:: https://badge.fury.io/py/file_encryptor.svg\n :target: http://badge.fury.io/py/file_encryptor", "description_content_type": null, "docs_url": "https://pythonhosted.org/file_encryptor/", "download_url": "https://github.com/storj/file-encryptor/tarball/0.2.9", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Storj/file-encryptor", "keywords": "storj,metadisk,convergent encryption", "license": "The MIT License (MIT)\n\nCopyright (c) 2014 Storj Labs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "file_encryptor", "package_url": "https://pypi.org/project/file_encryptor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/file_encryptor/", "project_urls": { "Download": "https://github.com/storj/file-encryptor/tarball/0.2.9", "Homepage": "https://github.com/Storj/file-encryptor" }, "release_url": "https://pypi.org/project/file_encryptor/0.2.9/", "requires_dist": null, "requires_python": null, "summary": "Tool for convergently encrypting files used by MetaDisk.", "version": "0.2.9" }, "last_serial": 1407387, "releases": { "0.2.9": [ { "comment_text": "", "digests": { "md5": "e909519331b31cf0507fe90afbd3bbe9", "sha256": "4bc85ce2e2e344eeb74a0c20a29cf4427fcb3ceafcfc314adc6ca348b61b8cd1" }, "downloads": -1, "filename": "file_encryptor-0.2.9.tar.gz", "has_sig": false, "md5_digest": "e909519331b31cf0507fe90afbd3bbe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4815, "upload_time": "2015-02-03T07:01:47", "url": "https://files.pythonhosted.org/packages/33/0a/02a172c320d6f2f4725464ffcad5c415ce2192d8dca031213afcb99653c6/file_encryptor-0.2.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e909519331b31cf0507fe90afbd3bbe9", "sha256": "4bc85ce2e2e344eeb74a0c20a29cf4427fcb3ceafcfc314adc6ca348b61b8cd1" }, "downloads": -1, "filename": "file_encryptor-0.2.9.tar.gz", "has_sig": false, "md5_digest": "e909519331b31cf0507fe90afbd3bbe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4815, "upload_time": "2015-02-03T07:01:47", "url": "https://files.pythonhosted.org/packages/33/0a/02a172c320d6f2f4725464ffcad5c415ce2192d8dca031213afcb99653c6/file_encryptor-0.2.9.tar.gz" } ] }