{ "info": { "author": "Dustin Oprea", "author_email": "myselfasunder@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "--------\nOverview\n--------\n\nThis package was a remedy to there being no PyPI-published, pure-Python \nRijndael (AES) implementations, and that nothing available, in general, was \ncompatible with both Python2 *and* Python3. The same is true of the PBKDF2 \nkey-expansion algorithm.\n\nThe encryptor takes a source generator (which yields individual blocks). There \nare source-generators provided for both data from a variable and data from a \nfile. It is trivial if you'd like to write your own. The encryptor and \ndecryptor functions are written as generators. Decrypted data has PKCS7\npadding. A utility function is provided to trim this (*trim_pkcs7_padding*).\n\nThe implementation includes Python2 and Python3 implementations of both \nRijndael and PBKDF2, and chooses the version when loaded.\n\nThe default block-size is 128-bits in order to be compatible with AES.\n\nThis project is also referred to as *pprp*, which stands for \"Pure Python \nRijndael and PBKDF2\".\n\n\n------------\nInstallation\n------------\n\nInstall via *pip*::\n\n $ sudo pip install pprp\n\n\n-------\nExample\n-------\n\nEncrypt and decrypt the data, and compare the results. This example works in \nboth Python 2 and 3.\n\nTop imports and defines::\n\n import sys\n import io\n import os.path\n import hashlib\n\n import pprp\n import pprp.config\n\n # Make the strings the right type for the current Python version.\n def trans(text):\n return text.encode('ASCII') if sys.version_info[0] >= 3 else text\n\n passphrase = trans('password')\n salt = trans('salt')\n key_size = 32\n data = (\"this is a test\" * 100).encode('ASCII')\n\nDo the key-expansion::\n\n key = pprp.pbkdf2(passphrase, salt, key_size)\n\nCreate a source from available data::\n\n sg = pprp.data_source_gen(data)\n\nFeed the source into the encryptor::\n\n eg = pprp.rjindael_encrypt_gen(key, sg)\n\nFeed the encryptor into the decryptor::\n\n dg = pprp.rjindael_decrypt_gen(key, eg)\n\nSink the output to a variable (and automatically trim the padding)::\n\n decrypted = pprp.decrypt_sink(dg)\n\nThere is also a *decrypt_to_file_sink* sink that takes a file-object as the \nfirst argument.\n\nCheck the result::\n\n assert data == decrypted\n\nThe following is a portion of the output of the example script \n(*test/example.py*). Notice that, due to this being an efficient, \ngenerator-based design, the encryption of each block is followed by a \ndecryption::\n\n 2014-07-01 12:24:13,182 - pprp.source - DEBUG - Yielding [data] source block: (0)-(0)\n 2014-07-01 12:24:13,182 - pprp.adapters - DEBUG - Encrypting and yielding encrypted block: (0)\n 2014-07-01 12:24:13,183 - pprp.adapters - DEBUG - Decrypting and yielding decrypted block: (0)\n 2014-07-01 12:24:13,183 - pprp.source - DEBUG - Yielding [data] source block: (1)-(16)\n 2014-07-01 12:24:13,183 - pprp.adapters - DEBUG - Encrypting and yielding encrypted block: (1)\n 2014-07-01 12:24:13,183 - pprp.adapters - DEBUG - Decrypting and yielding decrypted block: (1)\n 2014-07-01 12:24:13,183 - pprp.source - DEBUG - Yielding [data] source block: (2)-(32)\n 2014-07-01 12:24:13,183 - pprp.adapters - DEBUG - Encrypting and yielding encrypted block: (2)\n 2014-07-01 12:24:13,183 - pprp.adapters - DEBUG - Decrypting and yielding decrypted block: (2)\n 2014-07-01 12:24:13,184 - pprp.source - DEBUG - Yielding [data] source block: (3)-(48)\n 2014-07-01 12:24:13,184 - pprp.adapters - DEBUG - Encrypting and yielding encrypted block: (3)\n 2014-07-01 12:24:13,184 - pprp.adapters - DEBUG - Decrypting and yielding decrypted block: (3)\n ...\n\n\n-----\nNotes\n-----\n\nThe generators can take a block-size in the event that you don't want the \ndefault. The default block-size can also be changed via the PPRP_BLOCK_SIZE \nenvironment variable.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dsoprea/RijndaelPbkdf", "keywords": "rijdael pbkdf2", "license": "GPL 2", "maintainer": "", "maintainer_email": "", "name": "pprp", "package_url": "https://pypi.org/project/pprp/", "platform": "", "project_url": "https://pypi.org/project/pprp/", "project_urls": { "Homepage": "https://github.com/dsoprea/RijndaelPbkdf" }, "release_url": "https://pypi.org/project/pprp/0.2.6/", "requires_dist": null, "requires_python": "", "summary": "A pure-Python Rijndael (AES) and PBKDF2 library. Python2.7- and Python3-compatible.", "version": "0.2.6" }, "last_serial": 3765571, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "bcec3fed379cf1acd1cf1f2cc1a4a100", "sha256": "0dec05d742f66663c0a8c81798e509c445db95c52bdda2c400c1669196770960" }, "downloads": -1, "filename": "pprp-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "bcec3fed379cf1acd1cf1f2cc1a4a100", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18476, "upload_time": "2014-07-01T15:32:48", "url": "https://files.pythonhosted.org/packages/21/30/cd62d3ec2247e9aee2454cec288fb9cb712bd61395add4bfa3c8ae0de551/pprp-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7e33ee18a5aa590bfedf2d8ffde4526", "sha256": "249bdd03228a04b92ace0f0c23ac7f7b2718645f561a81c2c2ab5f4806550327" }, "downloads": -1, "filename": "pprp-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e7e33ee18a5aa590bfedf2d8ffde4526", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12601, "upload_time": "2014-07-01T15:32:46", "url": "https://files.pythonhosted.org/packages/90/dc/8a02896f58541efb368e6e33b82e7374feb2ad6913595bb4682eade9a55b/pprp-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6406738e896288d809f3f4f245035cdd", "sha256": "53fc0554e70b706258c9d4db48e7d484fc375d118386fc46d93afdb4b1e58f6e" }, "downloads": -1, "filename": "pprp-0.2.1-py2-none-any.whl", "has_sig": false, "md5_digest": "6406738e896288d809f3f4f245035cdd", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20483, "upload_time": "2014-07-01T16:32:31", "url": "https://files.pythonhosted.org/packages/a9/e1/a5d237c2b412914a7302e5b079d871d32c230794d9d3ff5043281cc9043b/pprp-0.2.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "656787fe42b07350c7876312728bae26", "sha256": "a72f86f9846b219b07e7d0d3ca9e5fdb896dc5d8ef25986784724ce79df1d66b" }, "downloads": -1, "filename": "pprp-0.2.1.tar.gz", "has_sig": false, "md5_digest": "656787fe42b07350c7876312728bae26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13904, "upload_time": "2014-07-01T16:32:28", "url": "https://files.pythonhosted.org/packages/d9/3e/9615954f8e74580efe2942a7bf43935f3902a27ba2ef92f7b49d1a1a077d/pprp-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "4b5d3165d82b37189d2e6b28a8034229", "sha256": "c0ac4c4d6d968cbce990ac670ca1d8a1287a01c278ccc33d1e93fe722454fd54" }, "downloads": -1, "filename": "pprp-0.2.2-py2-none-any.whl", "has_sig": false, "md5_digest": "4b5d3165d82b37189d2e6b28a8034229", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20849, "upload_time": "2014-07-01T18:27:39", "url": "https://files.pythonhosted.org/packages/a7/bd/768e60a1675f882760dea3a2f4e99c2194fca0750df6ea2b83e88e913a27/pprp-0.2.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c99154a11be23bf7744255c8e6437cd8", "sha256": "e0b23d44cd84552411f9b8a753f454c6d1e1ba3deb300f05bd7650294f14c287" }, "downloads": -1, "filename": "pprp-0.2.2.tar.gz", "has_sig": false, "md5_digest": "c99154a11be23bf7744255c8e6437cd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14081, "upload_time": "2014-07-01T18:27:36", "url": "https://files.pythonhosted.org/packages/ef/98/ac005178d2f921fe60fb0eefe4bd36e51a564851f113d81834cf5ffa75f9/pprp-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "aa11b65f524088bcb0631f10ceb4be6b", "sha256": "413522f7d42802250efd14f5bd26baab56e4b79da302b1678e47d005bd949167" }, "downloads": -1, "filename": "pprp-0.2.3-py2-none-any.whl", "has_sig": false, "md5_digest": "aa11b65f524088bcb0631f10ceb4be6b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20889, "upload_time": "2014-07-02T00:45:46", "url": "https://files.pythonhosted.org/packages/4c/90/94ac1508726a8c1ac3c9f79f9937f53704afd04d693eeb26698f3b252113/pprp-0.2.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "932a0168006aae9aa51c24205f62ba3f", "sha256": "f0bf789b766937f64127eeadb1948dd144764c1b7886652118c6e3fa7cb32751" }, "downloads": -1, "filename": "pprp-0.2.3.tar.gz", "has_sig": false, "md5_digest": "932a0168006aae9aa51c24205f62ba3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14116, "upload_time": "2014-07-02T00:45:43", "url": "https://files.pythonhosted.org/packages/fc/73/48fc21b2ec27735452677fd9341ae430ae95b5f169d7d319afbc17e8746a/pprp-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "e015bd3645d13f02c35e99f7a3b27d5b", "sha256": "f92ef8ac56f79533d6e68d6cc499a14f1f956d3022e6d73561eafba587d31ba3" }, "downloads": -1, "filename": "pprp-0.2.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e015bd3645d13f02c35e99f7a3b27d5b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20885, "upload_time": "2014-07-02T09:22:05", "url": "https://files.pythonhosted.org/packages/e6/d2/6f0b2a9093e145bce8147dc1db3fd794c969750ff23e7714c4e22e01fb6f/pprp-0.2.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb171eb47273943d11b5e1817f68dac2", "sha256": "2d75bcbcf6148bb27dc4c73a080f7031a25be92651f1510340b17a3dda9732ef" }, "downloads": -1, "filename": "pprp-0.2.4.tar.gz", "has_sig": false, "md5_digest": "bb171eb47273943d11b5e1817f68dac2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14128, "upload_time": "2014-07-02T09:22:02", "url": "https://files.pythonhosted.org/packages/8d/d6/f2387defe2777142df31656cd09c9a9de4160204c03565f0e5d76b8b329e/pprp-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "61179324e7e034fbc584fbdd14c393e3", "sha256": "6151242972bada2d0270e30b9f74072c8742adc4b9573f356d6742ddfd66dc1d" }, "downloads": -1, "filename": "pprp-0.2.5-py2-none-any.whl", "has_sig": false, "md5_digest": "61179324e7e034fbc584fbdd14c393e3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 20912, "upload_time": "2014-07-07T22:12:52", "url": "https://files.pythonhosted.org/packages/bd/fa/c600b10ce6439c72cf9986873a489108fc37f67e7a1937ab1bf6a8d6a2dc/pprp-0.2.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5dc67e69b8a9c5b482718f7be50fabd7", "sha256": "0f0d550cd0740e59a9d2812db6a6c4a797f25f79bda17427dca56b0302b55bd9" }, "downloads": -1, "filename": "pprp-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "5dc67e69b8a9c5b482718f7be50fabd7", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 20936, "upload_time": "2014-07-07T22:13:27", "url": "https://files.pythonhosted.org/packages/76/d9/8cb73a9689a6e4371fe03dbb16f9d984aff832970873766880875e10e2aa/pprp-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a07072d95ca1744562297f5383af3f4e", "sha256": "5a8225b6efdcea9cab96966ad20debbb0d87aaffcc598af244ad5e3391c20845" }, "downloads": -1, "filename": "pprp-0.2.5.tar.gz", "has_sig": false, "md5_digest": "a07072d95ca1744562297f5383af3f4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14146, "upload_time": "2014-07-07T22:12:49", "url": "https://files.pythonhosted.org/packages/da/8a/4923f0e15e8f3471264e57898efdf0641f5e4f476a1536a7266e569b6ce1/pprp-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "157b31452db4a270f89935b0147626f0", "sha256": "de7df334e9f98f3eebd3d91ef0ab663d885f5d7dbd2a291defe92682a83567cc" }, "downloads": -1, "filename": "pprp-0.2.6.tar.gz", "has_sig": false, "md5_digest": "157b31452db4a270f89935b0147626f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14118, "upload_time": "2018-04-15T01:47:33", "url": "https://files.pythonhosted.org/packages/46/3f/04e156e217e1aa070413eae441fd6e03d80713b23208bde6921aca1fbbc4/pprp-0.2.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "157b31452db4a270f89935b0147626f0", "sha256": "de7df334e9f98f3eebd3d91ef0ab663d885f5d7dbd2a291defe92682a83567cc" }, "downloads": -1, "filename": "pprp-0.2.6.tar.gz", "has_sig": false, "md5_digest": "157b31452db4a270f89935b0147626f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14118, "upload_time": "2018-04-15T01:47:33", "url": "https://files.pythonhosted.org/packages/46/3f/04e156e217e1aa070413eae441fd6e03d80713b23208bde6921aca1fbbc4/pprp-0.2.6.tar.gz" } ] }