mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 19:37:04 +00:00
[8445] Fixed redundant calculation of v and s on every login
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.
This commit is contained in:
parent
4d0088e7a9
commit
3b1b68595b
8 changed files with 47 additions and 60 deletions
|
|
@ -159,6 +159,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();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ class BigNumber
|
|||
return t %= bn;
|
||||
}
|
||||
|
||||
bool isZero() const;
|
||||
|
||||
BigNumber ModExp(const BigNumber &bn1, const BigNumber &bn2);
|
||||
BigNumber Exp(const BigNumber &);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8444"
|
||||
#define REVISION_NR "8445"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue