Skip to content

Secure Remote Password

etcimon edited this page Aug 17, 2026 · 5 revisions

The library contains an implementation of SRP-6a in botan.constructs.srp6 (version(SRP6), full only). Default TLS policy does not offer SRP ciphersuites. SPAKE2+ (version(SPAKE2P)) is the newer PAKE if you are choosing today.

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