Repository navigation
Releases: misiektoja/go-tls-srp
Releases · misiektoja/go-tls-srp
Release list
v0.2.1
This release requires Go 1.27.3 and documents how to keep unknown usernames hidden and how to bound the server cost of a handshake.
Server
SimulatedVerifierseed - The seed is a secret key. Generate at least 16 random bytes once, store them with the verifiers and use the same seed on every server instance. The simulated verifier must use the group of the stored verifiers. The HTTPS example reads the seed from theSRP_SIMULATED_SEEDenvironment variable.- Handshake cost - The security notes in the README describe the server cost of a handshake. The library sets no handshake deadline, so limit the connections a client can open and set a deadline on each accepted connection before its handshake.
Requirements
- Go 1.27.3 -
go.modrequires the newest Go 1.27 patch release, so the tests, lint and govulncheck run against a current standard library.make go-version-checkfails when a newer patch release exists and the Upstream Go workflow runs it on every push and weekly.
v0.2.0
This release adds the client side. srptls.Client signs in to TLS-SRP servers with a username and password. Tested against OpenSSL 1.1.1w s_server.
Client
Client- Runs the TLS 1.2 SRP handshake as a client.Config.Usernameis required andConfig.ServerNameis sent as SNI. The client offers Extended Master Secret and secure renegotiation indication, refuses renegotiation and fails the handshake when the server's Finished message does not verify, so a server without the user's verifier cannot complete it.Config.CipherSuites,Config.RandandConfig.KeyLogWriterwork as on the server.Config.MinGroupBits- Sets the smallest RFC 5054 group the client accepts. It is 2048 bits by default, so the 1024 and 1536 bit groups must be allowed explicitly. Groups outside RFC 5054 are always refused.- Client errors - The handshake error wraps
ErrWrongPasswordwhen the server sendsbad_record_mac,ErrUnknownUsernameforunknown_psk_identityandErrAccessDeniedforaccess_denied.ConnectionState.TLSUniqueon the client equals the server's value.
v0.1.0
First release. Package srptls is a TLS 1.2 server that signs clients in with SRP from RFC 5054.
It is a trimmed copy of crypto/tls from Go 1.27.2. Tested with curl 7.61.1, OpenSSL 1.1.1k
s_client, libssl 3.5.9 and libssl 4.0.3.
Added
- SRP cipher suites
TLS_SRP_SHA_WITH_AES_256_CBC_SHAandTLS_SRP_SHA_WITH_AES_128_CBC_SHA.
The 3DES suite is used only when listed inConfig.CipherSuites. - All seven RFC 5054 groups, from 1024 to 8192 bits.
Config.GetVerifierreturns the verifier for a username.NewVerifiercreates one and
OpenSSLsrpvfileverifiers work as they are.SimulatedVerifierhides unknown usernames.- Refusals and wrong passwords.
ErrAccessDeniedrefuses a client before the SRP computation
with anaccess_deniedalert. A wrong password fails with an error that wraps
ErrWrongPassword. - Extended Master Secret, secure renegotiation indication and SNI.
ConnectionStatereports
thetls-uniquechannel binding and exports keying material.
Not included: the client side, TLS 1.3, session resumption, certificates and ALPN.