#include "SRP6.h"
◆ EphemeralKey
◆ Salt
◆ Verifier
◆ SRP6()
SRP6::SRP6 |
( |
std::string const & |
username, |
|
|
Salt const & |
salt, |
|
|
Verifier const & |
verifier |
|
) |
| |
EphemeralKey const B
Definition SRP6.h:79
static EphemeralKey _B(BigNumber const &b, BigNumber const &v)
Definition SRP6.h:70
BigNumber const _v
Definition SRP6.h:75
Salt const s
Definition SRP6.h:78
SHA1::Digest const _I
Definition SRP6.h:73
BigNumber const _b
Definition SRP6.h:74
static Digest GetDigestOf(uint8 const *data, std::size_t len)
Definition CryptoHash.h:48
◆ _B()
static std::array< uint8, 32 > const N
Definition SRP6.h:41
static BigNumber const _N
Definition SRP6.h:68
static BigNumber const _g
Definition SRP6.h:67
static constexpr std::size_t EPHEMERAL_KEY_LENGTH
Definition SRP6.h:37
BigNumber ModExp(BigNumber const &bn1, BigNumber const &bn2) const
Definition BigNumber.cpp:153
References BigNumber::ModExp().
◆ CalculateVerifier()
SRP6::Verifier SRP6::CalculateVerifier |
( |
std::string const & |
username, |
|
|
std::string const & |
password, |
|
|
SRP6::Salt const & |
salt |
|
) |
| |
|
staticprivate |
◆ CheckLogin()
static bool Acore::Crypto::SRP6::CheckLogin |
( |
std::string const & |
username, |
|
|
std::string const & |
password, |
|
|
Salt const & |
salt, |
|
|
Verifier const & |
verifier |
|
) |
| |
|
inlinestatic |
◆ GetSessionVerifier()
◆ MakeRegistrationData()
std::pair< SRP6::Salt, SRP6::Verifier > SRP6::MakeRegistrationData |
( |
std::string const & |
username, |
|
|
std::string const & |
password |
|
) |
| |
|
static |
◆ SHA1Interleave()
◆ VerifyChallengeResponse()
88{
89 ASSERT(!
_used,
"A single SRP6 object must only ever be used to verify ONCE!");
91
93 if ((_A %
_N).IsZero())
94 return std::nullopt;
95
98
100
101
105 std::transform(NHash.begin(), NHash.end(), gHash.begin(), NgHash.begin(), std::bit_xor<>());
106
108 if (ourM == clientM)
109 return K;
110
111 return std::nullopt;
112}
#define ASSERT
Definition Errors.h:68
bool _used
Definition SRP6.h:61
static SessionKey SHA1Interleave(EphemeralKey const &S)
Definition SRP6.cpp:50
static std::array< uint8, 1 > const g
Definition SRP6.h:40
std::array< uint8, EPHEMERAL_KEY_LENGTH > EphemeralKey
Definition SRP6.h:38
Definition BigNumber.h:29
References _b, _I, _N, _used, _v, ASSERT, B, g, Acore::Impl::GenericHash< HashCreator, DigestLength >::GetDigestOf(), BigNumber::ModExp(), N, s, and SHA1Interleave().
◆ _b
◆ _g
◆ _I
◆ _N
◆ _used
bool Acore::Crypto::SRP6::_used = false |
|
private |
◆ _v
◆ EPHEMERAL_KEY_LENGTH
constexpr std::size_t Acore::Crypto::SRP6::EPHEMERAL_KEY_LENGTH = 32 |
|
staticconstexpr |
std::array< uint8, 1 > const SRP6::g = { 7 } |
|
static |
std::array< uint8, 32 > const SRP6::N = HexStrToByteArray<32>("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7", true) |
|
static |
Salt const Acore::Crypto::SRP6::s |
◆ SALT_LENGTH
constexpr std::size_t Acore::Crypto::SRP6::SALT_LENGTH = 32 |
|
staticconstexpr |
◆ VERIFIER_LENGTH
constexpr std::size_t Acore::Crypto::SRP6::VERIFIER_LENGTH = 32 |
|
staticconstexpr |
The documentation for this class was generated from the following files:
- azerothcore-wotlk/src/common/Cryptography/Authentication/SRP6.h
- azerothcore-wotlk/src/common/Cryptography/Authentication/SRP6.cpp