The M2 Python Crypto Toolkit 0.02

Ng Pheng Siong
Fri, 24 Sep 99 01:03:26 GMT

The M2 Python Crypto Toolkit 0.01 (see below for 0.02 announcement )

The M2 Python Crypto Toolkit (M2Crypto) ==
+       OpenSSL
+       SWIG  

Python is an interpreted, dynamic-typing, object-oriented programming
language that is often compared to Perl, Scheme, Tcl or Java. SWIG -
Simplified Wrapper and Interface Generator - provides glue to link C/C++
libraries with the above-mentioned languages.

M2Crypto presents a Python interface to OpenSSL, via SWIG.

M2 stands for "me, too!"*

This release includes the following: DH, RSA, DSA, RC4, MD5, SHA1,
RIPEMD160, and the EVP interfaces for message digests, HMACs, and
symmetric ciphers. It requires Python 1.5.2, OpenSSL 0.9.4, and,
optionally, SWIG 1.1p5 or later. It has been tested under FreeBSD
2.x, Redhat Linux 5.2, and WinNT4. It should run anywhere Python
and OpenSSL run.

M2Crypto is released under a license similar to Python's. See LICENSE
for details.

For now, M2Crypto is intended to be a prototyping tool; it is _not_
for writing production crypto software.

In particular, note the following caveats:

1. There will be memory leaks, because of pointer ownership contention
between Python and SWIG. (These would be due to my misprogramming.)

2. There is no memory locking/clearing for keys, passphrases, etc.

3. The PRNG has no interface for CS**; it is unlikely to be CS***.

4. AFAIK, Python and OpenSSL have not been subjected to the full attention
of the Bugtraq crowd. M2Crypto's handling of active hostile input is
probably suspect.

Of course, I hope to address these in future.

Meanwhile, have fun! Your feedback is welcome.

Ng Pheng Siong

* Similar software are Marc-Andre Lemburg's mxCrypto, and two (?)
Python interfaces to the SSL portion of SSLeay/OpenSSL.

** Continuous seeding.

*** Cryptographically strong.

The M2 Python Crypto Toolkit 0.02

I am pleased to announce the release of M2Crypto 0.02.
The package is available at

This release incorporates support for SSL, specifically,

	For building servers, blocking i/o:
		- An SSLServer modeled after SocketServer.
		- A ForkingSSLServer that seems to work well.
		- A ThreadingSSLServer that runs one thread at a time. (!) ;-)
	For building servers, nonblocking i/o:
		- An ssl_dispatcher modeled after asyncore.dispatcher.

	A HTTPS server based on Medusa.
	For client-side web programming:
		- httpslib
		- urllib2

Your feedback is appreciated.

Ng Pheng Siong <>

21 Aug 1999

<P><A HREF="">M2 Python Crypto Toolkit
0.02</A> - OpenSSL wrapper and support for writing SSL-based
web servers and clients in Python.  (22-Aug-99)

----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:
Python Language Home Page:
Python Quick Help Index: