Re: RSA cryptography between Python and Java

2009-07-28 Thread M.-A. Lemburg
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 co

Re: RSA cryptography between Python and Java

2009-07-27 Thread Piet van Oostrum
> Michael Ströder (MS) wrote: >MS> Piet van Oostrum wrote: >>> Please note that the text to be encrypted must be smaller than the key >>> size (at least 11 bytes smaller). You shouldn't encrypt large data with >>> RSA anyway: it is too slow. Normally you would encrypt a session key >>> with R

Re: RSA cryptography between Python and Java

2009-07-27 Thread Michael Ströder
Piet van Oostrum wrote: > Please note that the text to be encrypted must be smaller than the key > size (at least 11 bytes smaller). You shouldn't encrypt large data with > RSA anyway: it is too slow. Normally you would encrypt a session key > with RSA and encrypt the data with the session key usin

Re: RSA cryptography between Python and Java

2009-07-27 Thread Piet van Oostrum
> Paul Rubin (PR) wrote: >PR> Rob Knop writes: >>> Are there any python libraries that will take a public key in this >>> format and do RSA encoding on it? >PR> Try www.trevp.com/tlslite I have looked into tlslite and found no easy way to do this. Maybe I over

Re: RSA cryptography between Python and Java

2009-07-25 Thread Paul Rubin
Rob Knop writes: > > www.trevp.com/tlslite > > Thanks, but that looks like a library for setting up a secure connection > between two ends. What I need is the ability to encrypt with a public > key in Python, where that public key was generated in Java as described, > and where the cipertext can

Re: RSA cryptography between Python and Java

2009-07-25 Thread Rob Knop
Paul Rubin writes: > www.trevp.com/tlslite Thanks, but that looks like a library for setting up a secure connection between two ends. What I need is the ability to encrypt with a public key in Python, where that public key was generated in Java as described, and wh

Re: RSA cryptography between Python and Java

2009-07-25 Thread Paul Rubin
Rob Knop writes: > Are there any python libraries that will take a public key in this > format and do RSA encoding on it? Try www.trevp.com/tlslite -- http://mail.python.org/mailman/listinfo/python-list

RSA cryptography between Python and Java

2009-07-25 Thread Rob Knop
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. A