To run the example project, clone the repo, and run pod install
from the Example directory first.
ios >= 13.0
swift >= 5.1
Thinbus-SRP is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Thinbus-SRP'
//register s and v send to server
let srp = Client.init(config: Config(prime: N, generator: g, key: key, algorithm: .sha256))
let verifier = client.enroll(identity: _identity, password: _password, salt: salt)
let userA = client.identify(identity: _identity, password: _password, salt: salt)
let message = try! srp.challenge(B: userB, salt: salt)
//confirm server's proof of shared key message M2 against
srp.confirm(proof: serverPoof)
//calc 256 bit share key
srp.session()
Thinbus-SRP is available under the MIT license. See the LICENSE file for more info.