Skip to main content

A Python crypto and SSL toolkit

Project description

Maintainer:

Matěj Cepl

Web-Site:

https://sr.ht/~mcepl/m2crypto/

Documentation:

https://m2crypto.readthedocs.io/

Issue tracker:

https://todo.sr.ht/~mcepl/m2crypto (R/O, please report issues via the email list).

M2Crypto = Python + OpenSSL + SWIG

builds.sr.ht status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m2crypto-0.45.0.tar.gz (243.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

m2crypto-0.45.0-cp313-cp313-win_amd64.whl (252.0 kB view details)

Uploaded CPython 3.13Windows x86-64

m2crypto-0.45.0-cp313-cp313-win32.whl (195.0 kB view details)

Uploaded CPython 3.13Windows x86

m2crypto-0.45.0-cp312-cp312-win_amd64.whl (252.8 kB view details)

Uploaded CPython 3.12Windows x86-64

m2crypto-0.45.0-cp312-cp312-win32.whl (194.8 kB view details)

Uploaded CPython 3.12Windows x86

m2crypto-0.45.0-cp311-cp311-win_amd64.whl (253.7 kB view details)

Uploaded CPython 3.11Windows x86-64

m2crypto-0.45.0-cp311-cp311-win32.whl (195.5 kB view details)

Uploaded CPython 3.11Windows x86

m2crypto-0.45.0-cp310-cp310-win_amd64.whl (252.9 kB view details)

Uploaded CPython 3.10Windows x86-64

m2crypto-0.45.0-cp310-cp310-win32.whl (195.4 kB view details)

Uploaded CPython 3.10Windows x86

File details

Details for the file m2crypto-0.45.0.tar.gz.

File metadata

  • Download URL: m2crypto-0.45.0.tar.gz
  • Upload date:
  • Size: 243.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0.tar.gz
Algorithm Hash digest
SHA256 ffc10d4d09901514f408dc74f60a4d7df21c44ebc9bf776c947bfdc7359421cf
MD5 6b28253f90b30f3d41294cbcdfa84a51
BLAKE2b-256 02c03035d9154edcddf3d2888628a9c0a6c1627f4268ba1d53f6f46004fa03ed

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 252.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 980d271fbaa74fb9d1bba459978bb961efdd8a82d2d81f0431477934c96793d0
MD5 fe7dade240b1ceae3f2c101437a288a1
BLAKE2b-256 98a6b0d9fe00bc59b0db7cca2d938845964d8dc7e44f7856e897e116e44b8da1

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 195.0 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 6cb49d7b67d9e214402820eabebe2ae6e6122f46753153ca31ae2eb2bcf294f4
MD5 aa6368d3b034b10888556dec5228811f
BLAKE2b-256 96b02d8f014acc8c9fc9a8c3cad39fe94ee8baa13b3c1c4a339f79211d7ef852

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 252.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2bdf2df55205752f906466a8c1adea76d71b3061a262e65fc0ad5a94d7873e96
MD5 901cdb29285b53aaee1279d24c8f03c2
BLAKE2b-256 9614843a0c78771dee078f796a8bcc354c29616d97e60a9fbbac972d741e3649

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 194.8 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 27630fa31a7d8042e8ce91b22d1910b964fb1f70baca9b192064e80441e83a5c
MD5 e31124ee19e920c36908892065e6a228
BLAKE2b-256 d5b66256336f0da4bce56055cbbdebc382429b705ad57abcd8ae9ae0445cb0a6

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 253.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 30a52ea8f87064cdd575a220a19709659a052f53b3400b32285853c64c5d8a29
MD5 5f58b36ce053570436f44925c6238771
BLAKE2b-256 3b85c8b867f3754c9b20dcbca60f5e4759ff43d67151c27d6dfd1fec3abf42c6

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 195.5 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 76b4b115e26161ead7a09f6d20eaeaa0f8cb2c1c9bcb1c0045417d48e9dbf645
MD5 867b3b01f7b5c35b2a7ac36d303fb5ce
BLAKE2b-256 48346b8f67f8c1c370940e40d3f68604d815ae7bb139a11b82c827500655ed4b

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 252.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 66f17471504492fbbadb717cbbf044832aa98d0ff92db724a63bcc32671413f4
MD5 43cdbe23f10d636756bae4b6d63e2c9d
BLAKE2b-256 3977369b8bf1b49722212defe0380a1cc8b81b7efd4720274141de1a3120866a

See more details on using hashes here.

File details

Details for the file m2crypto-0.45.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: m2crypto-0.45.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 195.4 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for m2crypto-0.45.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9d56404b9239343a5acedd7bb06a792511e7fdb7c9e358c0314758cb8aec1bc3
MD5 45be2aebc051880b82ef52355a8d9a68
BLAKE2b-256 b39c98828cd8218f889f169ed172816bdda2844ea6d4167acaf6bbf37443e923

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page