diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mod.c')
-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 |