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

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


  Branch: refs/heads/openssl-3.0
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 8a4c3ed751cf256a0702fa87417e4bbf429c4562
      https://github.openssl.org/openssl/openssl/commit/8a4c3ed751cf256a0702fa87417e4bbf429c4562
  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)

(cherry picked from commit e58ba181de6b0dfad0dc371f8d962c82138a906e)


  Commit: 4f675d8c600bfde652aff28cb10c2d16be11fa65
      https://github.openssl.org/openssl/openssl/commit/4f675d8c600bfde652aff28cb10c2d16be11fa65
  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)

(cherry picked from commit c9ddc5af5199909d196ee80ccd7abcff2eb42a34)


Compare: https://github.openssl.org/openssl/openssl/compare/279e66f76ac3...4f675d8c600b


More information about the openssl-commits mailing list