Table of Contents

Class SimulatedTlsSrpIdentityManager

Namespace
Org.BouncyCastle.Tls
Assembly
BouncyCastle.Cryptography.dll

An implementation of TlsSrpIdentityManager that simulates the existence of "unknown" identities to obscure the fact that there is no verifier for them.

public class SimulatedTlsSrpIdentityManager : TlsSrpIdentityManager
Inheritance
SimulatedTlsSrpIdentityManager
Implements
Inherited Members

Constructors

SimulatedTlsSrpIdentityManager(Srp6Group, TlsSrp6VerifierGenerator, TlsMac)

public SimulatedTlsSrpIdentityManager(Srp6Group group, TlsSrp6VerifierGenerator verifierGenerator, TlsMac mac)

Parameters

group Srp6Group
verifierGenerator TlsSrp6VerifierGenerator
mac TlsMac

Fields

m_group

protected readonly Srp6Group m_group

Field Value

Srp6Group

m_mac

protected readonly TlsMac m_mac

Field Value

TlsMac

m_verifierGenerator

protected readonly TlsSrp6VerifierGenerator m_verifierGenerator

Field Value

TlsSrp6VerifierGenerator

Methods

GetLoginParameters(byte[])

Lookup the TlsSrpLoginParameters corresponding to the specified identity.

public virtual TlsSrpLoginParameters GetLoginParameters(byte[] identity)

Parameters

identity byte[]

the SRP identity sent by the connecting client.

Returns

TlsSrpLoginParameters

the TlsSrpLoginParameters for the specified identity, or else 'simulated' parameters if the identity is not recognized. A null value is also allowed, but not recommended.

Remarks

NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC 5054 2.5.1.3. SimulatedTlsSrpIdentityManager is provided for this purpose.

GetRfc5054Default(TlsCrypto, Srp6Group, byte[])

Create a SimulatedTlsSrpIdentityManager that implements the algorithm from RFC 5054 2.5.1.3.

public static SimulatedTlsSrpIdentityManager GetRfc5054Default(TlsCrypto crypto, Srp6Group group, byte[] seedKey)

Parameters

crypto TlsCrypto

TlsCrypto

group Srp6Group

the Srp6Group defining the group that SRP is operating in.

seedKey byte[]

the secret "seed key" referred to in RFC 5054 2.5.1.3.

Returns

SimulatedTlsSrpIdentityManager

an instance of SimulatedTlsSrpIdentityManager.

Exceptions

IOException