[gnutls-devel] GnuTLS | gnutls_pubkey_encrypt_data throws encryption error when passing an input with same size as the key. (#1402)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Sep 10 20:41:06 CEST 2022



Santino Mazza created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1402



## 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

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1402
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220910/2ebaf528/attachment.html>


More information about the Gnutls-devel mailing list