Return to site

Rsa decryption python

broken image
broken image

While technically speaking generating a signature with the public key constitutes encryption, there are enough differences in how public and private keys are used that it is not surprising that this library doesn’t support explicitly using the private key to encrypt with. The library you are using already has a (closed) ticket on the same attribute error. RSA encryption can only be performed with an RSA public key according to the RSA standard. Is RSA encryption with a private key the same as signature generation? KevinBlandy: # AttributeError: 'PublicKey' object has no attribute 'blinded_decryptĭon’t try to use a public RSA key to decrypt, and by extension, don’t try to use a private RSA key to encrypt: Many people say that RSA private key encryption has some security problems. Is there something wrong with my operation? I learned about this problem in search engine. Text = rsa.decrypt(base64.b64decode(base64Text.encode()), publicKey) # AttributeError: 'PublicKey' object has no attribute 'blinded_decrypt' Text = rsa.decrypt(base64.b64decode(base64Text.encode()), privateKey)Ĭipher = rsa.encrypt(b'Hello World!', privateKey) I try to use code to describe my purpose import rsaĬipher = rsa.encrypt(b'Hello World!', publicKey)īase64Text = base64.b64encode(cipher).decode()

broken image