{ "info": { "author": "G. B. Versiani", "author_email": "guibv@yahoo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Communications :: Email", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries" ], "description": "=====================\nPython S/MIME Toolkit\n=====================\n\nThis library implements a S/MIME handler. It supports only S/MIME messages\nencryption using a public RSA key, in AES128-CBC, AES192-CBC or AES256-CBC\nmodes.\n\nThe ASN.1 implementation does not depend on pyasn1, as it showed too broken for\ncreating and reading CMS (Cryptographic Message Syntax). Instead, the\n`asn1crypto`_ was used in this project.\n\nThis implementation does not use the deprecated `pycrypto` anymore; instead it\nwas switched to the more modern `cryptography` library. It is not 'pure python'\nanymore (because of the latter dependency), but at least works.\n\n\nRequirements\n------------\n\n* Python 2.7 or Python 3.5+\n* cryptography\n* asn1crypto\n\n\nExample\n-------\n\nThe code below loads Alice's public key in PEM format and uses it to encrypt\nthe e-mail in S/MIME format::\n\n import sys\n import smime\n\n message = [\n 'To: \"Alice\" ',\n 'From: \"Bob\" ',\n 'Subject: A message from python',\n '',\n 'Now you see me.'\n ]\n\n with open('alice-public-key.pem', 'rb') as pem:\n print(smime.encrypt('\\n'.join(message), pem.read()))\n\nOutput::\n\n To: \"Alice\" \n From: \"Bob\" \n Subject: A message from python\n MIME-Version: 1.0\n Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m\n Content-Transfer-Encoding: base64\n Content-Disposition: attachment; filename=smime.p7m\n\n \n\nThe same can be decrypted using OpenSSL from the command line::\n\n $ openssl smime -decrypt -in smime.p7m -inkey alice-private-key.pem\n\nOpenSSL expects that the `smime.p7m` file above should be in DER or PEM format.\nThe latter should be enclosed in `-----BEGIN PKCS7-----` and `-----END\nPKCS7-----` and the content should be in base64 encoding, just like the output\nof the command above. Example::\n\n -----BEGIN PKCS7-----\n MIIBdgYJKoZIhvcNAQcDoIIBZzCCAWMCAQAxgb4wgbsCAQAwJjASMRAwDgYDVQQD\n EwdDYXJsUlNBAhBGNGvHgABWvBHTbi7EELOwMAsGCSqGSIb3DQEBAQSBgCVAQwNg\n LmJ5ESYxOM1YbOLz2gvzWY1Fk+LZZiylYe7+o1/e/MjtzNwhnu+8vziFwHbXEH1Y\n jndIbUxiLyXb3omtNDunRICQin5bdo6BI7oE0MufUSqMjk0YUk8UQeNCiUfK89PR\n RfDclb1/sM3XZ7mUJa2OzpnuQIWec3MuJ3k4MIGcBgkqhkiG9w0BBwEwHQYJYIZI\n AWUDBAEqBBCVZVOt2lxSzmd+Ti1M372xgHDR0+ToLk1MJeTTtmJdnnNNH6631PN0\n i3NJeJBKDDs4onI8xywqFtJP0of6GPoTGV/7D2vkgO2+jhCBTrzjYczbdOhh6Z5X\n o0i/81NPSoaLhrfwKMQvT7sXX7c9YdbTjyglyGqhXUN8h+mIRlP9IStD\n -----END PKCS7-----\n\nRemember that the above formatting serves only for the purpose of testing the\nencryption with OpenSSL. Do not make such enclosing in e-mails.\n\n\nLicense\n=======\n\nThis software is licensed under the Apache License 2.0. See the LICENSE file in\nthe top distribution directory for the full license text.\n\n\nVersioning\n==========\n\nThis software follows `Semantic Versioning`_\n\n\n.. _asn1crypto: https://github.com/wbond/asn1crypto\n.. _Semantic Versioning: http://semver.org/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/balena/python-smime", "keywords": "smime cryptography email", "license": "Apache License (2.0)", "maintainer": "", "maintainer_email": "", "name": "smime", "package_url": "https://pypi.org/project/smime/", "platform": "all", "project_url": "https://pypi.org/project/smime/", "project_urls": { "Homepage": "https://github.com/balena/python-smime" }, "release_url": "https://pypi.org/project/smime/0.0.5/", "requires_dist": [ "cryptography", "asn1crypto" ], "requires_python": "", "summary": "Python S/MIME Toolkit", "version": "0.0.5" }, "last_serial": 5574361, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4ee2f26429865f398767c2a07f83352c", "sha256": "d5798d3609a7edfc228c5bce5b8a0d25ff109308c6f77d59ccc146a26e258889" }, "downloads": -1, "filename": "smime-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4ee2f26429865f398767c2a07f83352c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 62377, "upload_time": "2016-06-28T13:24:47", "url": "https://files.pythonhosted.org/packages/87/34/18e020ed03736e5fdaeebabba4033843c9bce2213af1d30df9ef38a2d54f/smime-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9a1d827f0496b5f13319f836f51f723e", "sha256": "4842be1fb7e86700f15d912108d4181ecffdd81464731a62e3319a8ee51c75be" }, "downloads": -1, "filename": "smime-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9a1d827f0496b5f13319f836f51f723e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11137, "upload_time": "2019-07-23T20:32:40", "url": "https://files.pythonhosted.org/packages/b2/8a/8dd62007227af0f7a60ede327c45a063763ba68fa8046f04f1df941dc63f/smime-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "57b91b4a0eefdfc697f20197ea646b68", "sha256": "01a28223bf69967c575c1d953c652c448da57f5582df18ffcf8331f24f64ba1b" }, "downloads": -1, "filename": "smime-0.0.3.tar.gz", "has_sig": false, "md5_digest": "57b91b4a0eefdfc697f20197ea646b68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11139, "upload_time": "2017-09-11T19:33:07", "url": "https://files.pythonhosted.org/packages/43/48/b2e491152ebf33ac001e81c1d30560dd450cc9d7304d99ecd442d6baaf07/smime-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "ea89f13fa8e15f674ecb7b758c28e559", "sha256": "134c4f0d1840a00e913f5e115600243de008605e2012af282299c006ce6fe03f" }, "downloads": -1, "filename": "smime-0.0.4.tar.gz", "has_sig": false, "md5_digest": "ea89f13fa8e15f674ecb7b758c28e559", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92387, "upload_time": "2019-07-23T20:32:43", "url": "https://files.pythonhosted.org/packages/ef/24/53ff1e620c4a3da28c65697310d8275498c4b5c763c38706a01a356ca720/smime-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "052ecd9482b97332f600906aba2c36ae", "sha256": "9e80d6e234ccfc5755ac5e09ef75c5d66ca72fd8f91cfb8f901b5d0d68c0fba0" }, "downloads": -1, "filename": "smime-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "052ecd9482b97332f600906aba2c36ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19356, "upload_time": "2019-07-23T20:37:24", "url": "https://files.pythonhosted.org/packages/bc/15/a95a280d95916402d8a06efff33e1bd5620af62a2b20f31573ea615e9ecc/smime-0.0.5-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "052ecd9482b97332f600906aba2c36ae", "sha256": "9e80d6e234ccfc5755ac5e09ef75c5d66ca72fd8f91cfb8f901b5d0d68c0fba0" }, "downloads": -1, "filename": "smime-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "052ecd9482b97332f600906aba2c36ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19356, "upload_time": "2019-07-23T20:37:24", "url": "https://files.pythonhosted.org/packages/bc/15/a95a280d95916402d8a06efff33e1bd5620af62a2b20f31573ea615e9ecc/smime-0.0.5-py3-none-any.whl" } ] }