Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto/dh
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2016-04-22 05:30:37 +0300
committerDavid Benjamin <davidben@google.com>2016-05-12 01:34:19 +0300
commit0e01eb534c25ccd5ce59917cd5ef37c059a94ebb (patch)
tree49e45ac839b30e8e2a8467877f3f66317d498fd8 /crypto/dh
parentd229433d7537dae5723a168c64ed8c70719d3f24 (diff)
Call |BN_mod_exp_mont_consttime| in crypto/dh.
|BN_mod_exp_mont| will forward to |BN_mod_exp_mont_consttime|, so this is a no-op semantically. However, this allows the linker to drop the implementation of |BN_mod_exp_mont| even when the DH code is in use. Change-Id: I0cb8b260224ed661ede74923bd134acb164459c1 Reviewed-on: https://boringssl-review.googlesource.com/7730 Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dh/dh.c b/crypto/dh/dh.c
index a5cf94d9..94eb3643 100644
--- a/crypto/dh/dh.c
+++ b/crypto/dh/dh.c
@@ -291,8 +291,8 @@ int DH_generate_key(DH *dh) {
}
BN_with_flags(&local_priv, priv_key, BN_FLG_CONSTTIME);
- if (!BN_mod_exp_mont(pub_key, dh->g, &local_priv, dh->p, ctx,
- dh->method_mont_p)) {
+ if (!BN_mod_exp_mont_consttime(pub_key, dh->g, &local_priv, dh->p, ctx,
+ dh->method_mont_p)) {
goto err;
}
@@ -353,8 +353,8 @@ int DH_compute_key(unsigned char *out, const BIGNUM *peers_key, DH *dh) {
}
BN_with_flags(&local_priv, dh->priv_key, BN_FLG_CONSTTIME);
- if (!BN_mod_exp_mont(shared_key, peers_key, &local_priv, dh->p, ctx,
- dh->method_mont_p)) {
+ if (!BN_mod_exp_mont_consttime(shared_key, peers_key, &local_priv, dh->p, ctx,
+ dh->method_mont_p)) {
OPENSSL_PUT_ERROR(DH, ERR_R_BN_LIB);
goto err;
}