How to verify a signature using SHA1WithRSA with python

geremy condra debatem1 at
Mon Mar 29 16:01:28 CEST 2010

On Mon, Mar 29, 2010 at 2:42 AM, Gao <gaoxtwarrior at> wrote:
> I have a public key, and I want to write a method that verify a string which
> is a signature signed by this public key's private key. And is M2Crypto I
> can't find algorithm named "SHA1WithRSA" or so . Could anyone help me?
> --

In OpenSSL you would simply use the EVP_Verify* functions, I don't
see that in M2Crypto's documentation though. You may have to use

If you're not forced to use M2Crypto, you *may* want to check out evpy,
which is a set of ctypes bindings for openssl's evp interface and a very
easy to use wrapper. It's available at, and will
be up for a first release in a few weeks.

Geremy Condra

More information about the Python-list mailing list