views:

261

answers:

2

how to encrypt one time password using the public key and again recover it by the private key of the user , i need to do it using python

+4  A: 

You can use Python's encryption library called PyCrypto (www.pycrypto.org). Here's some overview of Public Key encryption using PyCrypto: http://www.dlitz.net/software/pycrypto/doc/#crypto-publickey-public-key-algorithms

sharjeel
thanks sharjeel ,i was also searching for this library .
A: 

Use an encryption library, for example pyopenssl, which looks more up-to-date then pycrypto.

pyopenssl is a rather thin wrapper around (a subset of) the OpenSSL library. With thin wrapper I mean that a lot of the object methods do nothing more than calling a corresponding function in the OpenSSL library.

gimel