{"repo":"adam-fowler/swift-srp","free":true,"listed":false,"github":"https://github.com/adam-fowler/swift-srp","clone":"git clone https://github.com/adam-fowler/swift-srp.git","description":"Swift Secure Remote Password","language":"Swift","stars":42,"topics":["secure-remote-password","srp","swift","authentication","srp-6a","rfc-2945","rfc-5054","security"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"Swift SRP This library provides a swift implementation of the Secure Remote Password protocol. Secure Remote Password (SRP) provides username and password authentication without needing to provide your password to the server. As the server never sees your password it can never leak it to anyone else. The server is provided with a cryptographic verifier that is derived from the password and a salt value that was used in the generation of this verifier. Both client and server generate large private and public keys and with these are able to generate a shared secret. The client then sends a proof they have the secret and if it is verified the server will do the same to verify the server as well. The SRP protocol is detailed in RFC2945. This library implements version 6a of the protocol which includes the username in the salt to avoid the issue where a malicious server attempting to learn if two users have the same password. I believe it is also compliant with RFC5054. Usage First you create a configuration object. This will hold the hashing algorithm you are using, the large safe prime number required and a generator value. There is an enum that holds example primes and generators. It is general safer to use these as they are the ones provided in RFC5054 and have been battle tested. The following generates a configuration using SHA256 and a 2048 bit safe prime. You need to be sure both client and server use the same configuration. By default, g is padded to the size of N before ","default_branch":null,"files":null,"tree":[],"storefront":"/r/adam-fowler","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adam-fowler/swift-srp/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}