Re: Regarding Encrypted datalength

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As I wrote before, there is no such function. There is only the
EVP_PKEY_get_size() which gives you the maximum length the encrypted
data can have for a given key.

If you do not know the length of the ciphertext for the
EVP_PKEY_decrypt() call, you can use the EVP_PKEY_get_size() value,
compare it with the data length of your data and if it is smaller, use
it as the ciphertext length in the EVP_PKEY_decrypt() call. That should
work fine - at least with the algorithms currently supported by
OpenSSL.

On Sat, 2022-10-01 at 22:16 +0000, ANUJ SHARMA wrote:
> Hi,
> Just wanted to know that is there any Openssl/EVP_PKEY function where
> I pass the encrypted data and encryption method and get the size of
> encrypted data.
> Something like:
> EncryptedDataLen=OpensslFunc(encrypted_data,encryption_method)
> 
> Thanks for your helping in advance.

-- 
Tomáš Mráz, OpenSSL





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux