Re: [PATCH] cipher: fix dhgex for non-GCM ciphers for OpenSSL 3.0

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

 



On Fri, 4 Dec 2020 at 01:59, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
[...]

Thanks for the investigation.

> The issue is that openssh needs the "current" IV state (which the
> now-deprecated EVP_CIPHER_CTX_iv() used to return), but it's calling the
wrong
> openssl function to obtain it.

It's not that simple.

In 2018, LibreSSL added EVP_CIPHER_CTX_get_iv (
https://github.com/libressl-portable/openbsd/commit/db321d7792) which
returns the current IV, and OpenSSH has been using it ever since.

In 2020, OpenSSL added a function of the same name (
https://github.com/openssl/openssl/commit/79f4417ed94) which behaves
differently.  Maybe OpenSSL could change it before 3.0 instead of shipping
an incompatible API?  EVP_CIPHER_CTX_get_original_iv would be consistent
with the function they deprecated. ie

EVP_CIPHER_CTX_get_iv -> EVP_CIPHER_CTX_get_original_iv
EVP_CIPHER_CTX_get_iv_state -> EVP_CIPHER_CTX_get_iv

-- 
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[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