How can I use RSA_private_encrypt in cryptography when I migrate from M2Crypt? #11591
Labels
Stale
waiting-on-reporter
Issue is waiting on a reply from the reporter. It will be automatically cloesd if there is no reply.
python 3.11/2.7
cryptography: just pip install latest version
I have some code implement by M2Crypto`s RSA, which has used rsa private key to encrypt data.
I know that in general, the signature function should be used directly, but I can only migrate the logic in the original way.
I tried to use sign+prehashed to bypass the hash algorithm that sign must provide, attempting to implement private encryption, but this does not seem to work.
I checked the source code of M2Crpto. RSA_private_encrypt is provided by openssl. It seems that cryptography does not support this function now? How can I implement it?
The text was updated successfully, but these errors were encountered: