Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Seeking pure Python AES/RSA library compatible with OpenSSL

5 views
Skip to first unread message

novos...@gmail.com

unread,
Jan 22, 2009, 4:26:21 AM1/22/09
to
Hello,

I am faced with the following problem:

0. In pure Python, encrypt some data using AES.
1. In pure Python, encrypt the key used in 0 with RSA, given a private
key in PEM format.

2. In C, using OpenSSL, decrypt the AES key from 0 using the public
key that corresponds to private key in 1.
3. In C, using OpenSSL, decrypt the data from 0 with AES key from 2.

Question --- is there a library I can use for steps 0 and 1?

Thanks!

Paul Rubin

unread,
Jan 22, 2009, 4:42:43 AM1/22/09
to
novos...@gmail.com writes:
> 0. In pure Python, encrypt some data using AES.
> 1. In pure Python, encrypt the key used in 0 with RSA, given a private
> key in PEM format.
> Question --- is there a library I can use for steps 0 and 1?

I know there are some AES libs around, try google. The libs
will be quite slow.

I think tlslite can do PEM decoding and PKCS1.5 encryption
(http://trevp.net/tlslite).

novos...@gmail.com

unread,
Jan 22, 2009, 5:06:53 AM1/22/09
to
On Jan 22, 1:42 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:

Yes, tlslite is the only pure Python library I found that deals with
PEM. The problem is OpenSSL doesn't want to decrypt data encrypted by
tlslite (RSA_public_decrypt(), RSA_PKCS1_PADDING).

0 new messages