Re: Find out IV length

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

 





On 17/08/2022 06:30, Kreissl, Jochen wrote:
Hi,

given an SSL* or respectively an SSLCIPHER* struct, how can I figure out the length of the IV used by the negotiated cipher of the handshake?

I noticed that EVP_CIPHER has a metod to query this information, but I also don’t find a way to get an EVP_CIPHER from SSL*.

Any pointers (heh) would be very helpful, thanks.

Cheers


Given an SSL_CIPHER structure the associated EVP_CIPHER can be obtained using something like this:

EVP_CIPHER *ciph = EVP_get_cipherbyname(OBJ_nid2sn(SSL_CIPHER_get_cipher_nid(sslciph)))

But note that IV handling in TLS is a little complicated with the actual IV that is used for an actual encryption/decryption operation being composed of different elements. The details of which vary by ciphersuite and protocol version.

Matt



[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