|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <SRP6.h>
Public Types | |
| using | EphemeralKey = std::array<uint8, EPHEMERAL_KEY_LENGTH> |
| using | Salt = std::array<uint8, SALT_LENGTH> |
| using | Verifier = std::array<uint8, VERIFIER_LENGTH> |
Public Member Functions | |
| SRP6 (std::string const &username, Salt const &salt, Verifier const &verifier) | |
| std::optional< SessionKey > | VerifyChallengeResponse (EphemeralKey const &A, SHA1::Digest const &clientM) |
Static Public Member Functions | |
| static bool | CheckLogin (std::string const &username, std::string const &password, Salt const &salt, Verifier const &verifier) |
| static SHA1::Digest | GetSessionVerifier (EphemeralKey const &A, SHA1::Digest const &clientM, SessionKey const &K) |
| static std::pair< Salt, Verifier > | MakeRegistrationData (std::string const &username, std::string const &password) |
Public Attributes | |
| EphemeralKey const | B |
| Salt const | s |
Static Public Attributes | |
| static constexpr size_t | EPHEMERAL_KEY_LENGTH = 32 |
| static std::array< uint8, 1 > const | g = { 7 } |
| static std::array< uint8, 32 > const | N = HexStrToByteArray<32>("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7", true) |
| static constexpr size_t | SALT_LENGTH = 32 |
| static constexpr size_t | VERIFIER_LENGTH = 32 |
Static Private Member Functions | |
| static EphemeralKey | _B (BigNumber const &b, BigNumber const &v) |
| static Verifier | CalculateVerifier (std::string const &username, std::string const &password, Salt const &salt) |
| static SessionKey | SHA1Interleave (EphemeralKey const &S) |
Private Attributes | |
| BigNumber const | _b |
| SHA1::Digest const | _I |
| bool | _used = false |
| BigNumber const | _v |
Static Private Attributes | |
| static BigNumber const | _g |
| static BigNumber const | _N |
| using SkyFire::Crypto::SRP6::EphemeralKey = std::array<uint8, EPHEMERAL_KEY_LENGTH> |
| using SkyFire::Crypto::SRP6::Salt = std::array<uint8, SALT_LENGTH> |
| using SkyFire::Crypto::SRP6::Verifier = std::array<uint8, VERIFIER_LENGTH> |
|
inlinestaticprivate |
|
staticprivate |
Definition at line 23 of file SRP6.cpp.
References _g, _N, and SkyFire::Impl::GenericHash< EVP_sha1, Constants::SHA1_DIGEST_LENGTH_BYTES >::GetDigestOf().
Referenced by CheckLogin(), and MakeRegistrationData().
|
inlinestatic |
Definition at line 30 of file SRP6.h.
References CalculateVerifier().
Referenced by RASocket::check_password(), and AccountMgr::CheckPassword().
|
inlinestatic |
Definition at line 35 of file SRP6.h.
References SkyFire::Impl::GenericHash< EVP_sha1, Constants::SHA1_DIGEST_LENGTH_BYTES >::GetDigestOf().
Referenced by AuthSocket::_HandleLogonProof().
|
static |
Definition at line 15 of file SRP6.cpp.
References CalculateVerifier(), and SkyFire::Crypto::GetRandomBytes().
Referenced by AccountMgr::ChangePassword(), AccountMgr::ChangeUsername(), and AccountMgr::CreateAccount().
|
staticprivate |
Definition at line 34 of file SRP6.cpp.
References SkyFire::Impl::GenericHash< EVP_sha1, Constants::SHA1_DIGEST_LENGTH_BYTES >::DIGEST_LENGTH, EPHEMERAL_KEY_LENGTH, and SkyFire::Impl::GenericHash< EVP_sha1, Constants::SHA1_DIGEST_LENGTH_BYTES >::GetDigestOf().
Referenced by VerifyChallengeResponse().
| std::optional< SessionKey > SRP6::VerifyChallengeResponse | ( | EphemeralKey const & | A, |
| SHA1::Digest const & | clientM ) |
|
private |
Definition at line 57 of file SRP6.h.
Referenced by SRP6(), and VerifyChallengeResponse().
|
staticprivate |
Definition at line 50 of file SRP6.h.
Referenced by _B(), and CalculateVerifier().
|
private |
Definition at line 56 of file SRP6.h.
Referenced by SRP6(), and VerifyChallengeResponse().
|
staticprivate |
Definition at line 51 of file SRP6.h.
Referenced by _B(), CalculateVerifier(), and VerifyChallengeResponse().
|
private |
Definition at line 44 of file SRP6.h.
Referenced by VerifyChallengeResponse().
|
private |
Definition at line 58 of file SRP6.h.
Referenced by SRP6(), and VerifyChallengeResponse().
| EphemeralKey const SkyFire::Crypto::SRP6::B |
Definition at line 62 of file SRP6.h.
Referenced by SRP6(), and VerifyChallengeResponse().
|
staticconstexpr |
Definition at line 21 of file SRP6.h.
Referenced by _B(), and SHA1Interleave().
|
static |
Definition at line 24 of file SRP6.h.
Referenced by VerifyChallengeResponse().
|
static |
Definition at line 25 of file SRP6.h.
Referenced by _B(), and VerifyChallengeResponse().
| Salt const SkyFire::Crypto::SRP6::s |
Definition at line 61 of file SRP6.h.
Referenced by SRP6(), and VerifyChallengeResponse().
|
staticconstexpr |
Definition at line 17 of file SRP6.h.
Referenced by RASocket::check_password(), and AccountMgr::CheckPassword().
|
staticconstexpr |
Definition at line 19 of file SRP6.h.
Referenced by RASocket::check_password(), and AccountMgr::CheckPassword().