[openssl/openssl] c62b0c: Don't truncate the input when decrypting in pkeyutl

Matt Caswell noreply at github.com
Mon Jun 26 08:50:09 UTC 2023


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: c62b0c73bb1b55ab6b49da1faff5602f130ebb9c
      https://github.com/openssl/openssl/commit/c62b0c73bb1b55ab6b49da1faff5602f130ebb9c
  Author: Matt Caswell <matt at openssl.org>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M apps/lib/apps.c
    M apps/pkeyutl.c

  Log Message:
  -----------
  Don't truncate the input when decrypting in pkeyutl

The pkeyutl app was truncating the input file for decryption leading to
incorrect results. This was probably ok historically when RSA was being
used for decryption which has short maximum sizes. This is not ok with SM2.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21272)

(cherry picked from commit 849450746f38a5658ef783abb0a8c79ae2861464)


  Commit: 61892ab241b04bf4432d8432f216233877149ab8
      https://github.com/openssl/openssl/commit/61892ab241b04bf4432d8432f216233877149ab8
  Author: Matt Caswell <matt at openssl.org>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    A test/certs/sm2-pub.key
    M test/recipes/20-test_pkeyutl.t

  Log Message:
  -----------
  Add a test for pkeyutl encrypt/decrypt using SM2

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21272)

(cherry picked from commit 810f7dc1c7cc5441097b398f753e33652848a4cc)


Compare: https://github.com/openssl/openssl/compare/87da0e6a08c4...61892ab241b0


More information about the openssl-commits mailing list