{ "info": { "author": "Keybase", "author_email": "max@keybase.io", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries" ], "description": "python-triplesec\n================\n\n.. image:: https://travis-ci.org/keybase/python-triplesec.png\n :alt: Build Status\n :target: https://travis-ci.org/keybase/python-triplesec\n\n.. image:: https://coveralls.io/repos/keybase/python-triplesec/badge.png\n :alt: Coverage Status\n :target: https://coveralls.io/r/keybase/python-triplesec\n\n.. image:: https://pypip.in/v/TripleSec/badge.png\n :alt: PyPi version\n :target: https://crate.io/packages/TripleSec\n\n.. image:: https://pypip.in/d/TripleSec/badge.png\n :alt: PyPi downloads\n :target: https://crate.io/packages/TripleSec\n\n\nA Python port of the TripleSec_ library. See also the JS implementation_.\n\nCompatible with Python 2.7 and 3.6+.\n\n.. _TripleSec: https://keybase.io/triplesec/\n.. _implementation: https://github.com/keybase/triplesec/\n\n\nInstallation\n------------\n\n::\n\n pip install TripleSec\n\nUsage\n-----\n\nInstantiate a ``triplesec.TripleSec(key=None)`` object, with or without a key (if omitted it will have to be specified at each use), then use the ``encrypt(message, key=None)`` and ``decrypt(ciphertext, key=None)`` methods.\n\nAll values must be binary strings (``str`` on Python 2, ``bytes`` on Python 3)\n\nShortcuts\n~~~~~~~~~\n\nThe (unkeyed) functions ``encrypt`` and ``decrypt`` are exposed at the module level.\n\nCommand line tool\n-----------------\n\nTripleSec offers a ``triplesec`` command line tool to encrypt and decrypt messages from the terminal.\n\nHere is the help::\n\n Command-line TripleSec encryption-decryption tool\n\n usage: triplesec [-h] [-b | --hex] [-k KEY] {enc|dec} [data]\n\n positional arguments:\n {enc|dec} enc: encrypt and sign a message with TripleSec; by\n default output a hex encoded ciphertext (see -b and\n --hex) -- dec: decrypt and verify a TripleSec ciphertext\n data the TripleSec message or ciphertext; if not specified it\n will be read from stdin; by default ciphertexts will be\n considered hex encoded (see -b and --hex)\n\n optional arguments:\n -h, --help show this help message and exit\n -b, --binary consider all input (key, plaintext, ciphertext) to be\n plain binary data and output everything as binary data -\n this turns off smart decoding/encoding - if you pipe\n data, you should use this\n --hex consider all input (key, plaintext, ciphertext) to be hex\n encoded; hex encode all output\n -k KEY, --key KEY the TripleSec key; if not specified will check the\n TRIPLESEC_KEY env variable, then prompt the user for it\n --compatibility Use Keccak instead of SHA3 for the second MAC and reverse\n endianness of Salsa20 in version 1. Only effective in\n versions before 4.\n\nChanges in 0.5\n-----------------------\nFor message authentication, the Triplesec spec uses the Keccak SHA3 proposal function for versions 1 through 3, but for some time, this library used the standardized SHA3-512 function instead. Thus, by default, the Python implementation for versions 1 through 3 is incompatible with the JavaScript and Golang implementations.\nFrom version 4 and going forward, the spec will use only the standardized SHA3-512 function (provided, for example, by `hashlib` in Python), and the Python, JavaScript, and Golang implementations will be compatible.\n\nIf you would like to use Keccak with versions 1 through 3 (and thus achieve compatibility with the Node and Go packages), you can pass in `compatibility=True` to `encrypt` and `decrypt`, or on the commandline as detailed in the above section.\n\nAdditionally, encryptions that do not specify a version will now use version 4 by default, which is not compatible with previous versions.\n\nExample\n-------\n\n>>> import triplesec\n>>> x = triplesec.encrypt(b\"IT'S A YELLOW SUBMARINE\", b'* password *')\n>>> print(triplesec.decrypt(x, b'* password *').decode())\nIT'S A YELLOW SUBMARINE\n\n>>> from triplesec import TripleSec\n>>> T = TripleSec(b'* password *')\n>>> x = T.encrypt(b\"IT'S A YELLOW SUBMARINE\")\n>>> print(T.decrypt(x).decode())\nIT'S A YELLOW SUBMARINE\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/keybase/python-triplesec", "keywords": "", "license": "BSD-new", "maintainer": "", "maintainer_email": "", "name": "TripleSec", "package_url": "https://pypi.org/project/TripleSec/", "platform": "", "project_url": "https://pypi.org/project/TripleSec/", "project_urls": { "Homepage": "http://github.com/keybase/python-triplesec" }, "release_url": "https://pypi.org/project/TripleSec/0.5.1/", "requires_dist": [ "pycryptodomex (==3.7.1)", "scrypt (==0.8.6)", "six (==1.11.0)", "pysha3 (==1.0.2)", "twofish (==0.3.0)", "salsa20 (==0.3.0)" ], "requires_python": "", "summary": "a Python implementation of TripleSec", "version": "0.5.1" }, "last_serial": 4568526, "releases": { "0.1dev": [], "0.2": [ { "comment_text": "", "digests": { "md5": "b925a0b6b489e8667342d047f17d98f2", "sha256": "ebc278733f54c1a9bdde3dbe7b347e8653cfe7b412567ec52fb80221e9ec2501" }, "downloads": -1, "filename": "TripleSec-0.2.tar.gz", "has_sig": false, "md5_digest": "b925a0b6b489e8667342d047f17d98f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8812, "upload_time": "2013-11-16T02:41:31", "url": "https://files.pythonhosted.org/packages/d3/5e/0137adb86f53a98ba11656a5a6b9c2bcafbd61b0db2a6e487a03f1145b27/TripleSec-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3fcd11afd33abeaf5a75b34228808321", "sha256": "6ff223220a3df8b37ba24e7058139b0bd612433330d9dbcefdfd4b6403cf8d9d" }, "downloads": -1, "filename": "TripleSec-0.3.tar.gz", "has_sig": false, "md5_digest": "3fcd11afd33abeaf5a75b34228808321", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10283, "upload_time": "2013-12-11T23:59:01", "url": "https://files.pythonhosted.org/packages/db/1f/2fbfcac79c44d9f4520062c74cee42d4f9efc2c911c60088b6624c261f27/TripleSec-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9298739d3e98f153284f67512ebc8b83", "sha256": "0b091e827f4f47fe63fb805959e4cc67d58b71573d84ecebf2d503e747892b92" }, "downloads": -1, "filename": "TripleSec-0.4-py3.7.egg", "has_sig": false, "md5_digest": "9298739d3e98f153284f67512ebc8b83", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 22885, "upload_time": "2018-12-06T16:15:20", "url": "https://files.pythonhosted.org/packages/9e/bd/09a52a7b79816a3d328b607d70a50068cfa9b27ace19ab8f843970c982bf/TripleSec-0.4-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "598ea49743ff567b57cef376929bba02", "sha256": "f1c2eb898f492b33073718557cc72997973299f07d06743856df490d562fd1b0" }, "downloads": -1, "filename": "TripleSec-0.4.tar.gz", "has_sig": false, "md5_digest": "598ea49743ff567b57cef376929bba02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10762, "upload_time": "2016-09-14T00:35:20", "url": "https://files.pythonhosted.org/packages/c5/d5/e40811e51a3262b12e4c02551deb0c8699b172e42439c656f64926178c35/TripleSec-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "144c7207db495285599890f5b6abd8d7", "sha256": "75c091cf8de7c987349e0f24a46138a23c34a8690937ddbcc73ff398c3153d32" }, "downloads": -1, "filename": "TripleSec-0.5-py3.7.egg", "has_sig": false, "md5_digest": "144c7207db495285599890f5b6abd8d7", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 24869, "upload_time": "2018-12-06T16:15:21", "url": "https://files.pythonhosted.org/packages/ff/1f/80410eab3184b247948e6c0df011bdd3e5ce4d4d7d22aac11e86d93860c9/TripleSec-0.5-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "6de2af7a0073156ad0933f82a25be6c3", "sha256": "ba8d96fa370ce94fd7078b9cddab2daf66b8a71eaf5ad7df9b0f5ab758ddb65b" }, "downloads": -1, "filename": "TripleSec-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "6de2af7a0073156ad0933f82a25be6c3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12652, "upload_time": "2018-12-06T16:15:18", "url": "https://files.pythonhosted.org/packages/9a/fe/8c0956e5ff12f235a7849864d2b44bc5d8740a94f58d7440e24ed3672ad5/TripleSec-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54d94681683b2c351910ac8bb5ccfa1a", "sha256": "e86a8524ec371a8a5198d3485c40e566ca87675dc19cdd7b11d4d2c11f8f1ff2" }, "downloads": -1, "filename": "TripleSec-0.5.tar.gz", "has_sig": false, "md5_digest": "54d94681683b2c351910ac8bb5ccfa1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10739, "upload_time": "2018-12-06T16:15:23", "url": "https://files.pythonhosted.org/packages/2f/1f/d827312ed41ebb4da05ee17cccbadfa1750f19c2e926005eb490b2c4de37/TripleSec-0.5.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "b49da26407410816567ca00fe1887dfe", "sha256": "aab678dcba57a5d62c00ed29f40e4f32258783153810b12183b428c74c78c7c7" }, "downloads": -1, "filename": "TripleSec-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b49da26407410816567ca00fe1887dfe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12667, "upload_time": "2018-12-06T16:29:56", "url": "https://files.pythonhosted.org/packages/a4/b6/b25c0481b8dc822f9067610cd5427aba4699939df94af507107be21fd7ca/TripleSec-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91dab930219419185e468b88a2656d47", "sha256": "b9547a5cb433a96b429eadb36dc20f5f8af67b075d40652be475e16aba8b194c" }, "downloads": -1, "filename": "TripleSec-0.5.1.tar.gz", "has_sig": false, "md5_digest": "91dab930219419185e468b88a2656d47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10761, "upload_time": "2018-12-06T16:29:59", "url": "https://files.pythonhosted.org/packages/76/0c/3a5f8248a8be2b1ee8eb8aacb39acc77cfeb5644a0dd1f274916a19fbf3f/TripleSec-0.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b49da26407410816567ca00fe1887dfe", "sha256": "aab678dcba57a5d62c00ed29f40e4f32258783153810b12183b428c74c78c7c7" }, "downloads": -1, "filename": "TripleSec-0.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b49da26407410816567ca00fe1887dfe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12667, "upload_time": "2018-12-06T16:29:56", "url": "https://files.pythonhosted.org/packages/a4/b6/b25c0481b8dc822f9067610cd5427aba4699939df94af507107be21fd7ca/TripleSec-0.5.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "91dab930219419185e468b88a2656d47", "sha256": "b9547a5cb433a96b429eadb36dc20f5f8af67b075d40652be475e16aba8b194c" }, "downloads": -1, "filename": "TripleSec-0.5.1.tar.gz", "has_sig": false, "md5_digest": "91dab930219419185e468b88a2656d47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10761, "upload_time": "2018-12-06T16:29:59", "url": "https://files.pythonhosted.org/packages/76/0c/3a5f8248a8be2b1ee8eb8aacb39acc77cfeb5644a0dd1f274916a19fbf3f/TripleSec-0.5.1.tar.gz" } ] }