A question about the ValueError "Encryption/decryption failed"
Aug. 10, 2021
4:23 a.m.
Hello. I am a student from the City University of Hong Kong. I want to realize a project about oblivious transfer. I have a problem that I used public_key_1 to encrypt a message and I want to use three private key to decrypt the ciphertext. Of course, private_key_1 could decrypt the ciphertext correctly. The private_key_2 and private_key_3 could not decrypt the ciphertext and return the ValueError "Encryption/decryption failed". But what I need is if the private key could not decrypt the ciphertext, it ought to return a random array not an error. How could I achieve my aim using the package Cryptography of Python? I would be deeply grateful if you could solve my problem. Thank you for your help! Best Wishes!
1788
Age (days ago)
1789
Last active (days ago)
1 comments
2 participants
participants (2)
-
JIAO Guangren -
Paul Kehrer