This is not currently possible with cryptography's public API. Such an
approach is one potential way to solve
https://github.com/pyca/cryptography/issues/6167 though.

-Paul

On Tue, Aug 10, 2021 at 7:34 PM JIAO Guangren <gjiao...@my.cityu.edu.hk> wrote:
>
> 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!
> _______________________________________________
> Cryptography-dev mailing list
> Cryptography-dev@python.org
> https://mail.python.org/mailman/listinfo/cryptography-dev
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to