{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "libsignal-python\n========\nSignal encryption library for Python.\n\n[![Maturity](https://img.shields.io/pypi/status/libsignal.svg)](https://pypi.python.org/pypi/libsignal)\n[![License](https://img.shields.io/pypi/l/libsignal.svg)](https://pypi.python.org/pypi/libsignal)\n[![Version](https://img.shields.io/pypi/v/libsignal.svg)](https://pypi.python.org/pypi/libsignal)\n\n\nAbout\n--------\nThis is a python port of [libsignal-protocol-java](https://github.com/WhisperSystems/libaxolotl-android)\noriginally written by [Moxie Marlinspike](https://github.com/moxie0)\n\nCompare with\n[libsignal-protocol-php](https://github.com/albert-chin/libsignal-protocol-php)\nforked from\n[libaxolotl-php](https://github.com/mgp25/libaxolotl-php),\nwhich is a php port.\n\nOverview from original author's:\n\n > This is a ratcheting forward secrecy protocol that works in synchronous\n > and asynchronous messaging environments. The protocol overview is available\n > [here](https://github.com/trevp/axolotl/wiki), and the details of the wire\n > format are available [here](https://github.com/trevp/axolotl/wiki).\n \nRead rest of of details [here](https://github.com/WhisperSystems/libaxolotl-android/blob/master/README.md).\n\n\nInstallation\n--------\nThe library has some dependencies which are automatically pulled and installed\nif you use the instructions below for your OS\n\n - [protobuf 3.6+](https://github.com/google/protobuf/)\n - [cryptography](https://cryptography.io)\n - [python-axolotl-curve25519](https://github.com/tgalal/python-axolotl-curve25519)\n\n## Linux\n\nYou need to have python headers installed, usually through installing a package called `python-dev`, then as superuser run:\n```\npython setup.py install\n```\n\n## Mac\n\nI don't have mac to test. Send me instructions or a MacBook.\n\n## Windows\n\n - Install [mingw](http://www.mingw.org/) compiler\n - Add mingw to your PATH\n - In PYTHONPATH\\Lib\\distutils create a file called distutils.cfg and add these lines:\n \n```\n[build]\ncompiler=mingw32\n```\n\n - Install gcc: ```mingw-get.exe install gcc```\n - Install [zlib](http://www.zlib.net/)\n - ```python setup.py install```\n\n\nUsage\n--------\nThis python port is done in an almost 1:1 mapping to the original java code.\nTherefore any original documentation for the java code can be easily mapped\nand used with this python port.\n\n## Install time\n\nAt install time, a libaxolotl client needs to generate its identity keys, registration id, and\nprekeys.\n\n```python\n identityKeyPair = KeyHelper.generateIdentityKeyPair()\n registrationId = KeyHelper.generateRegistrationId()\n preKeys = KeyHelper.generatePreKeys(startId, 100)\n lastResortKey = KeyHelper.generateLastResortKey()\n signedPreKey = KeyHelper.generateSignedPreKey(identityKeyPair, 5)\n\n #Store identityKeyPair somewhere durable and safe.\n #Store registrationId somewhere durable and safe.\n\n #Store preKeys in PreKeyStore.\n #Store signed prekey in SignedPreKeyStore.\n```\n\n## Building a session\n\nA libaxolotl client needs to implement four interfaces: IdentityKeyStore, PreKeyStore, \nSignedPreKeyStore, and SessionStore. These will manage loading and storing of identity, \nprekeys, signed prekeys, and session state.\n\nOnce those are implemented, building a session is fairly straightforward:\n\n```python\nsessionStore = MySessionStore()\npreKeyStore = MyPreKeyStore()\nsignedPreKeyStore = MySignedPreKeyStore()\nidentityStore = MyIdentityKeyStore()\n\n# Instantiate a SessionBuilder for a remote recipientId + deviceId tuple.\nsessionBuilder = SessionBuilder(sessionStore, preKeyStore, signedPreKeyStore,\n identityStore, recipientId, deviceId)\n\n# Build a session with a PreKey retrieved from the server.\nsessionBuilder.process(retrievedPreKey)\n\nsessionCipher = SessionCipher(sessionStore, recipientId, deviceId)\nmessage = sessionCipher.encrypt(\"Hello world!\")\n\ndeliver(message.serialize())\n```\n\n\nExamples\n--------\npython-axolotl is actively used in [yowsup](https://github.com/tgalal/yowsup) to\nsupport the new end to end encryption in WhatsApp\n\n\nLicense\n--------\nLicensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ForstaLabs/libsignal-python", "keywords": "", "license": "GPLv3 License", "maintainer": "", "maintainer_email": "", "name": "libsignal", "package_url": "https://pypi.org/project/libsignal/", "platform": "any", "project_url": "https://pypi.org/project/libsignal/", "project_urls": { "Homepage": "https://github.com/ForstaLabs/libsignal-python" }, "release_url": "https://pypi.org/project/libsignal/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Python port of libsignal-protocol-java", "version": "0.0.4" }, "last_serial": 4965635, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "d5af121e59772398f67cab346ae3b438", "sha256": "3df0f75d0e91e72296364fe90b885a7509de66d451ce2e7f42c6be8136995e02" }, "downloads": -1, "filename": "libsignal-0.0.0.tar.gz", "has_sig": false, "md5_digest": "d5af121e59772398f67cab346ae3b438", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42666, "upload_time": "2019-03-20T20:18:10", "url": "https://files.pythonhosted.org/packages/2e/d7/0ced0d9252e348d2f36bff9f8ec2038abfc2ec6b7bb7a7c03413cf9d62b9/libsignal-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "ee3ce4201057bcc8b0e2212a0214e5bd", "sha256": "8ee0911eda8dd1bf48d214fdbb248c3ac96375afd94f4c75227425920a11c66e" }, "downloads": -1, "filename": "libsignal-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ee3ce4201057bcc8b0e2212a0214e5bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42292, "upload_time": "2019-03-20T20:22:57", "url": "https://files.pythonhosted.org/packages/5a/0f/599cf188b50906bd8762fd37b213a60491f5ae1b2c98a82135904c421db2/libsignal-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f1dd26413bf16aaee9d648ed508e8a35", "sha256": "a02c7f78932a925c4149f7622fc6dd07ae807e4a561a5ba8acedfad3b49939e5" }, "downloads": -1, "filename": "libsignal-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f1dd26413bf16aaee9d648ed508e8a35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42300, "upload_time": "2019-03-20T20:28:34", "url": "https://files.pythonhosted.org/packages/13/a4/0ada08135eb6bd9f9c497159fdba1c9ba313fcec90f13de77f330814f6c3/libsignal-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "9462203e028970cf82103ddf4ae3d410", "sha256": "b45dbdc60f89f62da79dcf8269cb53453f65000126d537fd92a56320bdaa2abf" }, "downloads": -1, "filename": "libsignal-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9462203e028970cf82103ddf4ae3d410", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40250, "upload_time": "2019-03-20T21:11:25", "url": "https://files.pythonhosted.org/packages/11/57/06a52b076816c6b8b8260a227192497d60e4e981980b12e0626feff6e07d/libsignal-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "f141b4850afcbeffb63ad78a46d88ff8", "sha256": "c27c206b82339e13f2c2fd7ab41f0073dfe750cd961ad1a81a4a94eabe94a728" }, "downloads": -1, "filename": "libsignal-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f141b4850afcbeffb63ad78a46d88ff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40256, "upload_time": "2019-03-20T21:17:47", "url": "https://files.pythonhosted.org/packages/53/27/e32fde7fea63362f3f93aca5c2640e5a66d9792c45dbd7dd19dc1cc7d275/libsignal-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f141b4850afcbeffb63ad78a46d88ff8", "sha256": "c27c206b82339e13f2c2fd7ab41f0073dfe750cd961ad1a81a4a94eabe94a728" }, "downloads": -1, "filename": "libsignal-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f141b4850afcbeffb63ad78a46d88ff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40256, "upload_time": "2019-03-20T21:17:47", "url": "https://files.pythonhosted.org/packages/53/27/e32fde7fea63362f3f93aca5c2640e5a66d9792c45dbd7dd19dc1cc7d275/libsignal-0.0.4.tar.gz" } ] }