Skip to main content

M2Crypto

Maintainer:

Matěj Cepl

Web-Site:

https://gitlab.com/m2crypto/m2crypto

Documentation:

https://m2crypto.readthedocs.io/

Email list:

m2crypto@lists.redcrew.org or http://redcrew.org/mailman/listinfo/m2crypto

M2Crypto = Python + OpenSSL + SWIG

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.

Metadata

Release files for M2Crypto 0.41.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for M2Crypto 0.41.0
File Size Uploaded Provenance Actions
M2Crypto-0.41.0.tar.gz 1.2 MB Without provenance Details for M2Crypto-0.41.0.tar.gz

Release files / M2Crypto-0.41.0.tar.gz

Download URL M2Crypto-0.41.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3a1358c7ee849046d91782a777f1786bf027a1c1d51b5faf8f19435bfc3f1495
BLAKE2b-256 checksum
How to use checksums
d77d2b414ab83ae8d1e1eb4e8c255f94a8424d41e975f97b25da82f4029f78d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.8

Security for M2Crypto 0.41.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.41.0 This release

1 release file No provenance

0.13

0.11

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page