[Python] RSA decryption with private key fails with Python

Discussão em 'Python' iniciado por Stack, Agosto 22, 2025.

  1. Stack

    Stack Membro Participativo

    I'v got public key RSA-encrypted data (32 bytes, exploded to 256), which I've to decrypt with the private key.

    I tried it with Python and PKCS1_v1_5, but pycryptodome-lib returns only the sentinal as signal, that something is wrong.

    I heard here Python library for RSA public decryption about turning a private key into a public key and do public decryption with that private key. But I've no glue, how to make this work, I still get only the sentinel as result.

    I also tried PKCS1_OAEP, but get "Incorrect decryption".

    I would be happy, if somebody could explain, how to RSA decrypt with a private key in Python.

    Continue reading...

Compartilhe esta Página