A Python crypto and SSL toolkit
Project description
- Maintainer:
Matěj Cepl
- Web-Site:
- Documentation:
- Email list:
- Issue tracker:
https://todo.sr.ht/~mcepl/m2crypto (R/O, please report issues via the email list).
M2Crypto = Python + OpenSSL + SWIG
NOTE: This library is currently in maintenance mode. We recommend using a more modern alternative such as PyCA/cryptography. Examples of how to migrate can be found in the documentation.
M2Crypto is a crypto and SSL toolkit for Python.
M2 stands for “me, too!”
M2Crypto comes with the following:
RSA, DSA, DH, HMACs, message digests, symmetric ciphers including AES,
TLS functionality to implement clients and servers.
Example SSL client and server programs, which are variously threading, forking or based on non-blocking socket IO.
HTTPS extensions to Python’s httplib, urllib and xmlrpclib.
Unforgeable HMAC’ing AuthCookies for web session management.
FTP/TLS client and server.
S/MIME v2.
ZSmime: An S/MIME messenger for Zope.
We care a lot about stable API and all Python methods should be preserved, note however that m2. namespace is considered internal to the library and it doesn’t have to be preserved. If however some change to it breaks your app, let us know and we will try to make things working for you.
And much more.
M2Crypto is released under a very liberal MIT licence. See LICENCE for details.
To install, see the file INSTALL.
Look at the tests and demos for example use. Recommended reading before deploying in production is “Network Security with OpenSSL” by John Viega, Matt Messier and Pravir Chandra, ISBN 059600270X.
Note these caveats:
Possible memory leaks, because some objects need to be freed on the Python side and other objects on the C side, and these may change between OpenSSL versions. (Multiple free’s lead to crashes very quickly, so these should be relatively rare.)
No memory locking/clearing for keys, passphrases, etc. because AFAIK Python does not provide the features needed. On the C (OpenSSL) side things are cleared when the Python objects are deleted.
Have fun! Your feedback is welcome.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for M2Crypto-0.42.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 940072e44f7e9064eed0aa654885e6688f91c441eb4212cc62e61caa252406f6 |
|
MD5 | 04f089337fbfcd92f79c538998fd9d84 |
|
BLAKE2b-256 | 00b91ed52ef8cb7988dd04854d85260f88dbbcc8f1d74485d1e61804a5a18a63 |
Hashes for M2Crypto-0.42.0-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76b4a53a5a6fc86cb43d9dad533d13ed247f030a8eb65ff308f2981647a7f626 |
|
MD5 | 80081efb18cd7dc4bf10a9c1ed4cb5c7 |
|
BLAKE2b-256 | c3471048b6887f2dd5e20b7a9ea044134bd19fcc3b53ad39e09098cd3a09bff5 |
Hashes for M2Crypto-0.42.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d31d1c42e6ee2e0c65bf0a3a679927b31bfff0a7f853b8ff3ccaf4ffe1ece309 |
|
MD5 | 2b0c77e6f229c5081e0dfa1f0b8e7916 |
|
BLAKE2b-256 | 12edf37f641c9acecb5c5396d9b2f7547e1cec024d27786beb9535ceca7fa3f9 |
Hashes for M2Crypto-0.42.0-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c057df9fa03467daa046c9a586fe02a56aff74f9d690b52e2672345cbdfc5d3 |
|
MD5 | d3c4504fde61f16ee1e14da8b27e906a |
|
BLAKE2b-256 | 5e5d114bb0be506826ba7cd7eebc77a9e7e7b432e573c0bb9263b37d2253f558 |
Hashes for M2Crypto-0.42.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b7a6f81d4a2cfe3fae98f7c167c4a09d034b36e5f6f82919e858a743da36b5 |
|
MD5 | 68d94c74c011c0efe0161f2daf5ee3a6 |
|
BLAKE2b-256 | 1755191de93321328cf417dcfa3d4434de34012f9dc283b707f77ae6247856bc |
Hashes for M2Crypto-0.42.0-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e070503435e8076fbbe411fe8360bf942420d3fc9c706174dd278d6c3e85aa34 |
|
MD5 | 9eec271a59bf76a3dd2ef87672d6371b |
|
BLAKE2b-256 | 97f9b33ac8ab2332585aa712018c2049aee27e01292ee7d6f1a86e42ed1627fc |