{ "info": { "author": "Richard Mitchell", "author_email": "mitch@awesomeco.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Security :: Cryptography" ], "description": "==========\npython-pgp\n==========\n\n.. image:: https://travis-ci.org/SkierPGP/python-pgp.svg?branch=master\n :target: https://travis-ci.org/SkierPGP/python-pgp\n\n.. image:: https://coveralls.io/repos/SkierPGP/python-pgp/badge.png\n :target: https://coveralls.io/r/SkierPGP/python-pgp\n\nSummary\n-------\n\npython-pgp aims to reproduce the full functionality of GnuPG in Python.\nIt may also be used for creating raw OpenPGP packets and packet streams\nfor test purposes. This may be a bit of a heavyweight solution for some\npurposes.\n\nThis is a fork of the original library - the original one does not seem to be active and/or have a PyPI package.\n\nAlternatives\n============\n\nOther Python packages which provide related functionality:\n\n* `pyassuan `_ - communicate\n with GnuPG using its socket protocol.\n* `pgpdump `_ - a pure python\n library for parsing OpenPGP packets.\n* `gnupg `_ - a wrapper around the\n GnuPG executable.\n* `python-gnupg `_ - another\n wrapper around the GnuPG executable.\n* `gpgkeys `_ - another wrapper\n around the GnuPG executable.\n* `gpglib `_ - a pure python\n library for parsing OpenPGP packets and decrypting messages.\n* `OpenPGP `_ - an unmaintained\n pure python library with much of the functionality of old versions\n of GnuPG.\n* `encryptedfile `_ - a\n pure python library for symmetrically encrypting files in an\n OpenPGP-compatible way.\n* `PGPy `_ - a pure python\n library with basic parsing and signing of OpenPGP packets.\n* `OpenPGP-Python `_ - a\n pure python port of\n `openpgp-php `_. It can\n parse OpenPGP packets and verify & create signatures.\n\nSystem requirements\n-------------------\n\n* build-essential\n\nFor Twofish support\n===================\n\n* libtwofish-dev\n\nRecommended\n===========\n\n* libgmp10-dev (for fastmath extension of pycrypto)\n\nInstallation\n------------\n::\n\n pip install pgp\n\nwith Twofish support::\n\n pip install pgp[twofish]\n\nwith Camellia support::\n\n pip install pgp[camellia]\n\n\nwith Twofish & Camellia support::\n\n pip install pgp[camellia,twofish]\n\nUsage\n-----\n\nHigh level\n==========\n\nParsing a message\n`````````````````\n::\n\n from pgp import read_message\n message = read_message(data)\n\nParsing a transferrable key\n```````````````````````````\n::\n\n from pgp import read_key\n key = read_key(data)\n\nLoading the GnuPG database\n``````````````````````````\n::\n\n from pgp import get_gnupg_db\n db = get_gnupg_db()\n key = db.search(user_id='Joe')[0]\n\nRetrieving a key from a keyserver and creating a message for it\n```````````````````````````````````````````````````````````````\n::\n\n >>> import datetime\n >>> from pgp import *\n >>> from pgp.keyserver import get_keyserver\n >>> ks = get_keyserver('hkp://pgp.mit.edu/')\n >>> results = ks.search('Joe Bloggs')\n >>> recipient_key = results[0].get()\n >>> message = message.TextMessage(\n ... u\"This message was encrypted using Python PGP\",\n ... datetime.datetime.now())\n >>> my_secret_key = read_key_file('secret_key.gpg')\n >>> my_secret_key.unlock('My passphrase')\n >>> message = message.sign(my_secret_key)\n >>> message = message.compress(2) # Compression algorithm 2\n >>> message = message.public_key_encrypt(9, recipient_key)\n >>> message_packets = message.to_packets()\n >>> message_data = b''.join(map(bytes, message_packets))\n >>> armored_message = armor.ASCIIArmor(\n ... armor.PGP_MESSAGE, message_data)\n >>> file_handle = open('message.asc', 'w')\n >>> file_handle.write(str(armored_message))\n >>> file_handle.close()\n\nLow level\n=========\n\nParsing a packet stream\n```````````````````````\n::\n\n from pgp.packets import parsers\n parsers.parse_binary_packet_data(packet_data)\n\nSerializing a packet\n````````````````````\n::\n\n from pgp.packets import parsers\n packets = parsers.parse_binary_packet_data(packet_data)\n b''.join(map(bytes, packets))\n\nSecurity\n--------\n\nIf you are using this package to handle private key data and\ndecryption, please note that there is no (reasonable) way currently in\nPython to securely erase memory and that copies of things are made often\nand in non-obvious ways. If you are concerned about key data being\ncompromised by a memory leak, do not use this package for handling\nsecret key data. On the other hand, \"if your memory is constantly being\ncompromised, I would re-think your security setup.\"\n\nOpenPGP uses compression algorithms. Beware when feeding untrusted data\ninto this library of\n`Zip bomb `_ or similar denial\nof service attacks.\n\nDevelopment\n-----------\n\nThe main repository for this package is `on GitHub\n`_. To develop on the package\nand install development dependencies, clone the repository and install\nthe 'dev' extras.::\n\n git clone git@github.com:mitchellrj/python-pgp.git\n cd python-pgp\n virtualenv .\n bin/pip install -e \".[dev]\"\n\nRunning tests\n=============\n::\n\n bin/python setup.py nosetests\n\nBuilding documentation\n======================\n::\n\n bin/python setup.py build_sphinx\n\n\n\nLicense\n-------\nCopyright (C) 2014 Richard Mitchell\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see .", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mitchellrj/python-pgp", "keywords": "pgp openpgp gpg cryptography security privacy", "license": "GPL 3", "maintainer": null, "maintainer_email": null, "name": "py-pgp", "package_url": "https://pypi.org/project/py-pgp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/py-pgp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mitchellrj/python-pgp" }, "release_url": "https://pypi.org/project/py-pgp/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "A Python implementation of OpenPGP", "version": "0.0.1" }, "last_serial": 1701709, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "38037cacb2660a9ff7683043c84b8cd4", "sha256": "3bf921781fdef4b8a9bc83cf2a76782cbd3446b4c96e4f4d2edb81821b8bad4d" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.2.egg", "has_sig": true, "md5_digest": "38037cacb2660a9ff7683043c84b8cd4", "packagetype": "bdist_egg", "python_version": "3.2", "requires_python": null, "size": 295346, "upload_time": "2015-08-31T15:16:28", "url": "https://files.pythonhosted.org/packages/3a/bb/c77504dfa1847310182f3c165ef08256c1819a1325040ef2fffd6ad1ba70/py_pgp-0.0.1-py3.2.egg" }, { "comment_text": "", "digests": { "md5": "b4b77fb556072eb94d652b719b2c50b4", "sha256": "ed96b27acf35ff69c8902364594429eb0d83e95bec5157b544fc21630af4d5eb" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.3.egg", "has_sig": true, "md5_digest": "b4b77fb556072eb94d652b719b2c50b4", "packagetype": "bdist_egg", "python_version": "3.3", "requires_python": null, "size": 381895, "upload_time": "2015-08-31T15:16:23", "url": "https://files.pythonhosted.org/packages/b2/88/47f5a918c196f2b956c22d493f6f1ca1827d8f3ecd81d602139045f99aa7/py_pgp-0.0.1-py3.3.egg" }, { "comment_text": "", "digests": { "md5": "b02ced06a077a8d539a73503021d4f44", "sha256": "1c683e4cbae84f4f5500714493bbdb2845238bd4860e61cb5485b7a1094fd14f" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.4.egg", "has_sig": true, "md5_digest": "b02ced06a077a8d539a73503021d4f44", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 375817, "upload_time": "2015-08-31T15:16:04", "url": "https://files.pythonhosted.org/packages/66/ad/8da6e200632a3232ae59f0ef7bd24a611263fb20cc6028f31923158b10ca/py_pgp-0.0.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "dd7242bccdb855db099e077940d67f47", "sha256": "e3d2b7bdf73d8e97cca12abad484df4d14d6b08da206f9547b839ff702a4ff83" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "dd7242bccdb855db099e077940d67f47", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 172903, "upload_time": "2015-08-31T15:16:12", "url": "https://files.pythonhosted.org/packages/47/3a/13a9d55dabdb316d82017014553e97ebc11e833c07615a5b24930acf01ae/py_pgp-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a20198672730d10fd35bd18047023a6", "sha256": "cad3611491598d1111a8abe0ebe5aa55119353bd8f7c78f623c16d131d3b85fc" }, "downloads": -1, "filename": "py-pgp-0.0.1.tar.gz", "has_sig": true, "md5_digest": "3a20198672730d10fd35bd18047023a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126027, "upload_time": "2015-08-31T15:16:17", "url": "https://files.pythonhosted.org/packages/63/d1/42ae81ae33db41b7474df650c71ea7648a14477a8103d53c974c872a24b8/py-pgp-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38037cacb2660a9ff7683043c84b8cd4", "sha256": "3bf921781fdef4b8a9bc83cf2a76782cbd3446b4c96e4f4d2edb81821b8bad4d" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.2.egg", "has_sig": true, "md5_digest": "38037cacb2660a9ff7683043c84b8cd4", "packagetype": "bdist_egg", "python_version": "3.2", "requires_python": null, "size": 295346, "upload_time": "2015-08-31T15:16:28", "url": "https://files.pythonhosted.org/packages/3a/bb/c77504dfa1847310182f3c165ef08256c1819a1325040ef2fffd6ad1ba70/py_pgp-0.0.1-py3.2.egg" }, { "comment_text": "", "digests": { "md5": "b4b77fb556072eb94d652b719b2c50b4", "sha256": "ed96b27acf35ff69c8902364594429eb0d83e95bec5157b544fc21630af4d5eb" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.3.egg", "has_sig": true, "md5_digest": "b4b77fb556072eb94d652b719b2c50b4", "packagetype": "bdist_egg", "python_version": "3.3", "requires_python": null, "size": 381895, "upload_time": "2015-08-31T15:16:23", "url": "https://files.pythonhosted.org/packages/b2/88/47f5a918c196f2b956c22d493f6f1ca1827d8f3ecd81d602139045f99aa7/py_pgp-0.0.1-py3.3.egg" }, { "comment_text": "", "digests": { "md5": "b02ced06a077a8d539a73503021d4f44", "sha256": "1c683e4cbae84f4f5500714493bbdb2845238bd4860e61cb5485b7a1094fd14f" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3.4.egg", "has_sig": true, "md5_digest": "b02ced06a077a8d539a73503021d4f44", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 375817, "upload_time": "2015-08-31T15:16:04", "url": "https://files.pythonhosted.org/packages/66/ad/8da6e200632a3232ae59f0ef7bd24a611263fb20cc6028f31923158b10ca/py_pgp-0.0.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "dd7242bccdb855db099e077940d67f47", "sha256": "e3d2b7bdf73d8e97cca12abad484df4d14d6b08da206f9547b839ff702a4ff83" }, "downloads": -1, "filename": "py_pgp-0.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "dd7242bccdb855db099e077940d67f47", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 172903, "upload_time": "2015-08-31T15:16:12", "url": "https://files.pythonhosted.org/packages/47/3a/13a9d55dabdb316d82017014553e97ebc11e833c07615a5b24930acf01ae/py_pgp-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a20198672730d10fd35bd18047023a6", "sha256": "cad3611491598d1111a8abe0ebe5aa55119353bd8f7c78f623c16d131d3b85fc" }, "downloads": -1, "filename": "py-pgp-0.0.1.tar.gz", "has_sig": true, "md5_digest": "3a20198672730d10fd35bd18047023a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126027, "upload_time": "2015-08-31T15:16:17", "url": "https://files.pythonhosted.org/packages/63/d1/42ae81ae33db41b7474df650c71ea7648a14477a8103d53c974c872a24b8/py-pgp-0.0.1.tar.gz" } ] }