GitHub - symeapp/srp-client: An RFC 5054-compatible SRP Client for Javascript. (original) (raw)
Javascript Client for the Secure Remote Protocol (SRP)
Warning: this is an alpha release and is not ready for production use. Peer review is appreciated.
This library implements a Javascript client for the SRP protocol. The client aims to be compatible with SRP revision 6A, as defined in RFC 5054 ("Using the Secure Remote Password (SRP) Protocol for TLS Authentication"). It is released under the MPL.
The code is directly based on Tom Wu's Javascript SRP demo, which is released under the SRP license.
Testing
This library is tested with Jasmine using the official test vectors from the SRP specification. The specs can be run by opening SpecRunner.html
in your browser.
Usage
Configuration
As shown in the examples below, this library accepts 1024, 1536, 2048, 4096, 6144 and 8192-bit group parameters. The default is 1024 bits.
Registration Example
Authentication Example
Further Reading
- RFC 2945 - The SRP Authentication and Key Exchange System
- RFC 5054 - Using the Secure Remote Password (SRP) Protocol for TLS Authentication
License
This library is released under the MPL.