diff options
author | jsing <> | 2023-02-03 04:47:59 +0000 |
---|---|---|
committer | jsing <> | 2023-02-03 04:47:59 +0000 |
commit | fa83c00adb1d2355e75f4c8cf2e4349292789cc5 (patch) | |
tree | 3e955bf6985125c4fc347b971fd77943c6dedaf3 /src/lib/libcrypto/bn/bn_mod.c | |
parent | 1a5678df965e311208c6fae9eb6a9b38ee493226 (diff) | |
download | openbsd-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.c | 14 |
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 | ||
118 | int | 118 | int |
119 | BN_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 | |||
124 | int | ||
125 | BN_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 | |||
130 | int | ||
119 | BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) | 131 | BN_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 |