diff options
author | Henrik Nord <[email protected]> | 2014-06-11 10:52:50 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-06-11 10:52:50 +0200 |
commit | 0bbe935474b3548a80925423ad625be842d00479 (patch) | |
tree | 935e4f7968ba7751f896d7b9ced7baeecb7afd5f /lib/crypto/c_src/crypto.c | |
parent | dd06ee01e06300725f46c85df18faace2d01d9d6 (diff) | |
parent | eee8d83ad1766b038b16102eb2006eaa7c21b4e5 (diff) | |
download | otp-0bbe935474b3548a80925423ad625be842d00479.tar.gz otp-0bbe935474b3548a80925423ad625be842d00479.tar.bz2 otp-0bbe935474b3548a80925423ad625be842d00479.zip |
Merge branch 'pguyot/fix_srp' into maint
* pguyot/fix_srp:
Fix bug in SRP implementation
Diffstat (limited to 'lib/crypto/c_src/crypto.c')
-rw-r--r-- | lib/crypto/c_src/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c index 948093d69c..6642183cb8 100644 --- a/lib/crypto/c_src/crypto.c +++ b/lib/crypto/c_src/crypto.c @@ -2897,8 +2897,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_ /* a + (u * x) */ bn_exp2 = BN_new(); - BN_mod_mul(bn_result, bn_u, bn_exponent, bn_prime, bn_ctx); - BN_mod_add(bn_exp2, bn_a, bn_result, bn_prime, bn_ctx); + BN_mul(bn_result, bn_u, bn_exponent, bn_ctx); + BN_add(bn_exp2, bn_a, bn_result); /* (B - (k * g^x)) ^ (a + (u * x)) % N */ BN_mod_exp(bn_result, bn_base, bn_exp2, bn_prime, bn_ctx); |