gnutls_pubkey_encrypt_data throws encryption error when passing an input with same size as the key.
Description of problem:
I'm trying to encrypt an input with a public RSA key without adding any padding, but when I put an input that has the same size as the key it just returns encryption error.
Version of gnutls used:
3.7.3
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Ubuntu
How reproducible:
Steps to Reproduce:
- Create a public RSA key with 512 bitlen (or any other)
- Create a buffer of 64 bytes (512 bits)
- Encrypt the buffer using the RSA key with gnutls_pubkey_encrypt_data
Actual results:
gnutls_pubkey_encrypt_data returns encryption error
Expected results:
gnutls_pubkey_encrypt_data should encrypt the data correctly