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.44.0.tar.gz (363.8 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.44.0-cp312-cp312-win_amd64.whl (260.7 kB view details)

Uploaded CPython 3.12Windows x86-64

M2Crypto-0.44.0-cp312-cp312-win32.whl (199.9 kB view details)

Uploaded CPython 3.12Windows x86

M2Crypto-0.44.0-cp311-cp311-win_amd64.whl (261.7 kB view details)

Uploaded CPython 3.11Windows x86-64

M2Crypto-0.44.0-cp311-cp311-win32.whl (200.6 kB view details)

Uploaded CPython 3.11Windows x86

M2Crypto-0.44.0-cp310-cp310-win_amd64.whl (261.3 kB view details)

Uploaded CPython 3.10Windows x86-64

M2Crypto-0.44.0-cp310-cp310-win32.whl (200.4 kB view details)

Uploaded CPython 3.10Windows x86

File details

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

File metadata

  • Download URL: m2crypto-0.44.0.tar.gz
  • Upload date:
  • Size: 363.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for m2crypto-0.44.0.tar.gz
Algorithm Hash digest
SHA256 384bb4cbd178ee0e74015311b7b1f9f2c377e3686e03fa070b3ec2f494671c0f
MD5 5069d8b91cf45a742b561dc7e210eb33
BLAKE2b-256 4d504a1b9dfc9a2367b10ba4ae027d5fc9e57b7694a06004932070286d4c25f7

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 260.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 565805a82bfe96d4f5eff5d7abf15bfa5cb75ee80ffbf6d61ebabfa4cff88ae1
MD5 7997801ccc2281250e3a860b97a920e8
BLAKE2b-256 798d4f8b591ec103a135b02ac3d1137b2fe19e8a3d6e62c86229a6dd335bcb9e

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 199.9 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 27e5ed3c891e4803023dd9d423d35039817192cf19cf72613c1edc37a9aae511
MD5 3a881fbcf71f0dd85035b82ff399cc13
BLAKE2b-256 968c904347008335fa4c0eaae274186cae8dd2d8ddad960b87ae5e3e07fb1852

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 261.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3827647b5da7868869f38ba9796ba08c21cea5347277ab09b54c4a1bfdfce006
MD5 708376abcad1c26da948e7aad69f2109
BLAKE2b-256 7211bf2b077c1312c1cad3b2581da3a373c1cccb20cf869a80a41743b72a40a2

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 200.6 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1a23462ad31cc64596efec885e4449ded35136a15cbe1dc560697f94a884f4a8
MD5 eba44d8f4c631f0ebf4decb3f28663fe
BLAKE2b-256 986f6d65c1159c6ee164a67bd33840fcae8833cc533c50c47456bca3a51660ed

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 261.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e4a49ecfe595ba918a3fb3620f3a7a5c64d558abbc8d67887d5a4878fce07085
MD5 12672606d8905df0a50906a1ee16a926
BLAKE2b-256 27697e79ab05f4b61524bd5547e32836743c92d4297948720eb38c6290564cd9

See more details on using hashes here.

File details

Details for the file M2Crypto-0.44.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: M2Crypto-0.44.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 200.4 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for M2Crypto-0.44.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 90f87ffe5855bd5b7807a2724ee58460610e94eaed06ca5c3a305883073757f5
MD5 0bbf62a29b735f3fe3edbb16231b1445
BLAKE2b-256 3832a5691791c70e3bc4e86b875dd4849ce7bf4b64c5394eec1cb079b2b822f0

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