Skip to content

Secure Remote Password

etcimon edited this page Dec 4, 2014 · 4 revisions

The library contains an implementation of the SRP-6a password based key exchange protocol in botan.constructs.srp6.

A SRP client provides what is called a SRP verifier to the server. This verifier is based on a password, but the password cannot be easily derived from the verifier. Later, the client and server can perform an SRP exchange.

⚠️ While knowledge of the verifier does not easily allow an attacker to get the raw password, they could still use the verifier to impersonate the server to the client, so verifiers should be carefully protected.

BigInt generateSrp6Verifier(in string identifier,
                            in string password,
                            in Vector!ubyte salt,
                            in string group_id,
                            in string hash_id);


Pair!(BigInt, SymmetricKey) srp6ClientAgree(in string username,
                                            in string password,
                                            in string group_id,
                                            in string hash_id,
                                            in Vector!ubyte salt,
                                            in BigInt B,
                                            RandomNumberGenerator rng);

string srp6GroupIdentifier(in BigInt N, in BigInt g);

Clone this wiki locally