[openssl/openssl] e58ba1: evp_test: Try computing MACs twice with reinitiali...

Tomas Mraz noreply at reply.github.openssl.org
Tue Apr 19 12:07:07 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: e58ba181de6b0dfad0dc371f8d962c82138a906e
      https://github.openssl.org/openssl/openssl/commit/e58ba181de6b0dfad0dc371f8d962c82138a906e
  Author: Tomas Mraz <tomas at openssl.org>
  Date:   2022-04-19 (Tue, 19 Apr 2022)

  Changed paths:
    M test/evp_test.c
    M test/recipes/30-test_evp_data/evpmac_poly1305.txt

  Log Message:
  -----------
  evp_test: Try computing MACs twice with reinitialization of EVP_MAC_CTX

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18100)


  Commit: c9ddc5af5199909d196ee80ccd7abcff2eb42a34
      https://github.openssl.org/openssl/openssl/commit/c9ddc5af5199909d196ee80ccd7abcff2eb42a34
  Author: Tomas Mraz <tomas at openssl.org>
  Date:   2022-04-19 (Tue, 19 Apr 2022)

  Changed paths:
    M providers/implementations/macs/cmac_prov.c
    M providers/implementations/macs/gmac_prov.c
    M providers/implementations/macs/hmac_prov.c
    M providers/implementations/macs/poly1305_prov.c
    M providers/implementations/macs/siphash_prov.c

  Log Message:
  -----------
  Avoid undefined behavior of provided macs on EVP_MAC reinitialization

When the context is reinitialized, i.e. the same key should be used
we must properly reinitialize the underlying implementation.

However in POLY1305 case it does not make sense as this special MAC
should not reuse keys. We fail with this provided implementation
when reinitialization happens.

Fixes #17811

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18100)


Compare: https://github.openssl.org/openssl/openssl/compare/e763b1861fb2...c9ddc5af5199


More information about the openssl-commits mailing list