Documentation ¶
Overview ¶
Package srp implements the SRP6 protocol used in World of Warcraft.
See the README for more info: https://github.com/kangaroux/go-wow-srp6
Index ¶
- Constants
- func ClientChallengeProof(username string, salt, clientPublicKey, serverPublicKey, sessionKey []byte) []byte
- func LargePrime() []byte
- func PasswordVerifier(username, password string, salt []byte) []byte
- func ReconnectProof(username string, clientData, serverData, sessionKey []byte) []byte
- func ServerChallengeProof(clientPublicKey, clientProof, sessionKey []byte) []byte
- func ServerPublicKey(verifier, serverPrivateKey []byte) []byte
- func SessionKey(clientPublicKey, serverPublicKey, serverPrivateKey, verifier []byte) []byte
- func WorldProof(username string, clientSeed, serverSeed, sessionKey []byte) []byte
Constants ¶
const ( ProofDataSize = 16 ProofSize = 20 SaltSize = 32 VerifierSize = 32 KeySize = 32 LargePrimeSize = 32 SessionKeySize = 40 Generator = 7 )
Variables ¶
This section is empty.
Functions ¶
func ClientChallengeProof ¶
func ClientChallengeProof( username string, salt, clientPublicKey, serverPublicKey, sessionKey []byte, ) []byte
ClientChallengeProof returns a proof that the client should send after receiving the auth challenge. The server should compare this with the proof received by the client and verify they match. If they match, the client has proven they know the session key.
func PasswordVerifier ¶
PasswordVerifier returns a 32 byte array containing the verifier. The verifier is a shared secret. The server should store it and ensure it is never made public.
func ReconnectProof ¶
ReconnectProof returns a proof that the client should send when attempting to reconnect. Like ClientChallengeProof, the server should compare this with the proof received by the client.
func ServerChallengeProof ¶
ServerChallengeProof returns a proof that the server should send after validating the client proof. The server proof is not used when the client is reconnecting.
func ServerPublicKey ¶
ServerPublicKey returns a 32 byte public key. The private key should be a 32 byte array cryptographically secure random data (crypto/rand). The server should send the public key to the client in plaintext.
func SessionKey ¶
SessionKey returns a 40 byte key that will be used for header encryption/decryption. The session key should never be made public.
func WorldProof ¶
WorldProof returns a proof that the client should send once they have finished authenticating and want to connect to the world/realm server.
Types ¶
This section is empty.