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

Matt Caswell noreply at github.com
Mon Jun 26 08:36:20 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 849450746f38a5658ef783abb0a8c79ae2861464
      https://github.com/openssl/openssl/commit/849450746f38a5658ef783abb0a8c79ae2861464
  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)


  Commit: 810f7dc1c7cc5441097b398f753e33652848a4cc
      https://github.com/openssl/openssl/commit/810f7dc1c7cc5441097b398f753e33652848a4cc
  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)


Compare: https://github.com/openssl/openssl/compare/43596b306b1f...810f7dc1c7cc


More information about the openssl-commits mailing list