Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Thinbus-SRP

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

ios >= 13.0
swift >= 5.1

Installation

Thinbus-SRP is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Thinbus-SRP'

Step 0: Generate a new verifier v for the user identity I and password P with salt s.

//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)

Step 1: Generates a one-time client key A encoded as a hexadecimal.

let userA = client.identify(identity: _identity, password: _password, salt: salt)

Step 2: Create challenge response to server's public key challenge B with a proof of password M1.

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()

License

Thinbus-SRP is available under the MIT license. See the LICENSE file for more info.

About

Secure Remote Password SRP-6a implementation by swift

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published