summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mod.c
diff options
context:
space:
mode:
authorjsing <>2023-02-03 04:47:59 +0000
committerjsing <>2023-02-03 04:47:59 +0000
commitfa83c00adb1d2355e75f4c8cf2e4349292789cc5 (patch)
tree3e955bf6985125c4fc347b971fd77943c6dedaf3 /src/lib/libcrypto/bn/bn_mod.c
parent1a5678df965e311208c6fae9eb6a9b38ee493226 (diff)
downloadopenbsd-fa83c00adb1d2355e75f4c8cf2e4349292789cc5.tar.gz
openbsd-fa83c00adb1d2355e75f4c8cf2e4349292789cc5.tar.bz2
openbsd-fa83c00adb1d2355e75f4c8cf2e4349292789cc5.zip
Turn BN_mod_{ct,nonct}() into symbols.
Also use accurate/useful variables names. ok tb@
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/bn/bn_mod.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_mod.c b/src/lib/libcrypto/bn/bn_mod.c
index cc8f8dea00..938b53d725 100644
--- a/src/lib/libcrypto/bn/bn_mod.c
+++ b/src/lib/libcrypto/bn/bn_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mod.c,v 1.14 2022/11/26 16:08:51 tb Exp $ */ 1/* $OpenBSD: bn_mod.c,v 1.15 2023/02/03 04:47:59 jsing Exp $ */
2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> 2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de>
3 * for the OpenSSL project. */ 3 * for the OpenSSL project. */
4/* ==================================================================== 4/* ====================================================================
@@ -116,6 +116,18 @@
116#include "bn_local.h" 116#include "bn_local.h"
117 117
118int 118int
119BN_mod_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
120{
121 return BN_div_ct(NULL, r, a, m, ctx);
122}
123
124int
125BN_mod_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
126{
127 return BN_div_nonct(NULL, r, a, m, ctx);
128}
129
130int
119BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) 131BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
120{ 132{
121 /* like BN_mod, but returns non-negative remainder 133 /* like BN_mod, but returns non-negative remainder