From 790c5348a33ad28422e9356e598bf7084b0159b6 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 2 Sep 2009 16:22:32 -0500 Subject: [8445] Fixed redundant calculation of v and s on every login Author: arrai The SRP-6 specifications clearly say, that v and s are only to be calculated on registering a user and changing his password; calculating them on every login is plain waste. --HG-- branch : trunk --- src/shared/Auth/BigNumber.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared/Auth/BigNumber.cpp') diff --git a/src/shared/Auth/BigNumber.cpp b/src/shared/Auth/BigNumber.cpp index 7872b141f3d..8869d3bb9e5 100644 --- a/src/shared/Auth/BigNumber.cpp +++ b/src/shared/Auth/BigNumber.cpp @@ -161,6 +161,11 @@ uint32 BigNumber::AsDword() return (uint32)BN_get_word(_bn); } +bool BigNumber::isZero() const +{ + return BN_is_zero(_bn)!=0; +} + uint8 *BigNumber::AsByteArray(int minSize) { int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes(); -- cgit v1.2.3