RSA cryptography between Python and Java

M.-A. Lemburg mal at egenix.com
Tue Jul 28 09:30:23 CEST 2009


Rob Knop wrote:
> I've created an RSA key in Java.  I have exported the public key by
> making it into a X509EncodedKeySpec and spitting out the result of
> getEncoded().
> 
> I want to use this public key to encode something in python that I will
> send to Java, and then decode in Java with the corresponding private
> key.
> 
> Are there any python libraries that will take a public key in this
> format and do RSA encoding on it?

M2Crypto will let you do this:

    http://chandlerproject.org/bin/view/Projects/MeTooCrypto

If you have access to the raw key data (instead of having it
encoded in a X509 certificate), then you can also use PyCrypto,
which does require setting up OpenSSL first:

    http://www.dlitz.net/software/pycrypto/

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 28 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the Python-list mailing list