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

Matt Caswell noreply at github.com
Mon Jun 26 08:43:07 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: 8ebc73453746e5303d5249986e2e42e7937a67ad
      https://github.com/openssl/openssl/commit/8ebc73453746e5303d5249986e2e42e7937a67ad
  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: e64f67ed7203a61cceb7ab7f5d0b725ea5fa8884
      https://github.com/openssl/openssl/commit/e64f67ed7203a61cceb7ab7f5d0b725ea5fa8884
  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/8d6ea2d2c3cf...e64f67ed7203


More information about the openssl-commits mailing list