[openssl/openssl] 6d9a69: s390x: Fix montgomery_multiplication_vectorized

"'TimoKellerIBM' via openssl-commits" <[email protected]> Mon, 13 Jul 2026 07:46:35 -0700
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 6d9a69861562176d3c2dbdd115aa71357de89e51
      https://github.com/openssl/openssl/commit/6d9a69861562176d3c2dbdd115aa71357de89e51
  Author: Timo Keller <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M crypto/ml_dsa/ml_dsa_ntt_vec128.c

  Log Message:
  -----------
  s390x: Fix montgomery_multiplication_vectorized

Introduce `reduce_twice_signed` that reduces from `(-2q,q)` to `[0,q)`.
Fix `montgomery_multiplication_vectorized` in `ml_dsa_ntt_vec128.c`
by calling `reduce_twice_signed` at the end of the computation ensuring
that the result is in `[0,q)` and not only in `(-2q,q)` or `(-q,q)`.
Do not call `reduce_once_signed` in `ossl_poly_ntt_mult_scalar_vec128`
and at the end of `ossl_ml_dsa_poly_ntt_inverse_vec128` anymore as it is
not necessary anymore after `reduce_twice_signed`.

Without this fix, keygen, sign or verify might fail or produce wrong
results.

Signed-off-by: Timo Keller <[email protected]>

Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Viktor Dukhovni <[email protected]>
MergeDate: Mon Jul 13 14:45:11 2026
(Merged from https://github.com/openssl/openssl/pull/31744)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/58f032-6d9a69%40github.com.