Browse Source

Fix SRP client key computation

Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>

GH: #1017
master
Cynh 6 years ago
committed by Kurt Roeckx
parent
commit
c9141a43e2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      crypto/srp/srp_lib.c

+ 2
- 2
crypto/srp/srp_lib.c View File

@ -228,9 +228,9 @@ BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x,
goto err;
if (!BN_mod_sub(tmp, B, tmp2, N, bn_ctx))
goto err;
if (!BN_mod_mul(tmp3, u, x, N, bn_ctx))
if (!BN_mul(tmp3, u, x, bn_ctx))
goto err;
if (!BN_mod_add(tmp2, a, tmp3, N, bn_ctx))
if (!BN_add(tmp2, a, tmp3))
goto err;
if (!BN_mod_exp(K, tmp, tmp2, N, bn_ctx))
goto err;


Loading…
Cancel
Save