Branch: refs/heads/openssl-3.4
Home:
https://github.com/openssl/openssl
Commit: a3f546d44e0e2f72f59a3cfe675c9a9957dc49c2
https://github.com/openssl/openssl/commit/a3f546d44e0e2f72f59a3cfe675c9a9957dc49c2
Author: Richard Levitte <lev...@openssl.foundation>
Date: 2026-05-29 (Fri, 29 May 2026)
Changed paths:
M crypto/bn/bn_mod.c
M include/openssl/bn.h
Log Message:
-----------
Refactor BN_mod() and BN_nnmod() arguments to match documentation
The documentation has this signature for that function:
int BN_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
int BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
The implementation, however, had this signature:
#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
That pattern alone trips up anyone who associates 'm' with modulus, and
and finds themselves using BN_nnmod() incorrectly.
This change modifies the argument names to match documentation.
Reviewed-by: Matt Caswell <ma...@openssl.foundation>
Reviewed-by: Tomas Mraz <to...@openssl.foundation>
Reviewed-by: Igor Ustinov <ig...@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <
es...@openssl.org>
MergeDate: Fri May 29 07:26:04 2026
(Merged from
https://github.com/openssl/openssl/pull/31304)
To unsubscribe from these emails, change your notification settings at
https://github.com/openssl/openssl/settings/notifications