package srp

Import Path
	github.com/gotd/td/internal/crypto/srp (on go.dev)

Dependency Relation
	imports 8 packages, and imported by one package

Involved Source Files hash.go new_hash.go pad.go Package srp contains implementation of Secure Remote Password protocol.
Package-Level Type Names (total 3, all are exported)
/* sort exporteds by: | */
Answer is result of SRP algorithm. A parameter (see SRP) M1 parameter (see SRP) func SRP.Hash(password, srpB, random []byte, i Input) (Answer, error)
Input is hashing algorithm parameters from server. Copy of tg.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow Base (see SRP 2FA login¹) Links: 1) https://core.telegram.org/api/srp 2048-bit modulus (see SRP 2FA login¹) Links: 1) https://core.telegram.org/api/srp One of two salts used by the derivation function (see SRP 2FA login¹) Links: 1) https://core.telegram.org/api/srp One of two salts used by the derivation function (see SRP 2FA login¹) Links: 1) https://core.telegram.org/api/srp func SRP.Hash(password, srpB, random []byte, i Input) (Answer, error) func SRP.NewHash(password []byte, i Input) (hash, newSalt []byte, _ error)
SRP is client implementation of Secure Remote Password protocol. See https://core.telegram.org/api/srp. Hash computes user password hash using parameters from server. See https://core.telegram.org/api/srp#checking-the-password-with-srp. NewHash computes new user password hash using parameters from server. See https://core.telegram.org/api/srp#setting-a-new-2fa-password. TDLib implementation: See https://github.com/tdlib/td/blob/fa8feefed70d64271945e9d5fd010b957d93c8cd/td/telegram/PasswordManager.cpp#L57. TDesktop implementation: See https://github.com/telegramdesktop/tdesktop/blob/v3.4.8/Telegram/SourceFiles/core/core_cloud_password.cpp#L68. func NewSRP(random io.Reader) SRP
Package-Level Functions (total 3, in which 1 is exported)
NewSRP creates new SRP instance.