7

SRP is short for Secure Remote Password protocol, and provides a better way for passwords to be sent over the internet.

I've read the information at it's Stanford University home page, the Wiki Page, looked at a in-browser demo. I even found a company that uses SRP, read their blog but still can't figure out how to integrate it into my application.

Question

Can someone provide general guidelines on how to implement SRP in a web browser, and what the requirements are?

My ultimate goal is to get this to work in ASP.NET MVC, though that may be a question best suited for Programmers.SE.

curiousguy
  • 5,068
  • 3
  • 26
  • 27
makerofthings7
  • 50,918
  • 55
  • 261
  • 556
  • Which criteria make SRP "better" than SSH? – Bruno Mar 19 '12 at 12:52
  • 1
    @Bruno - See this: http://srp.stanford.edu/analysis.html – makerofthings7 Mar 19 '12 at 13:04
  • 3
    Going from potential issues when using SSH (mostly coming from insufficient care from the user) to saying that SRP is better than SSH is quite a leap. You're comparing two completely different things (SRP is not a remote shell). – Bruno Mar 19 '12 at 13:13
  • and the reason for people wanting SRP in javascript is pretty obvious - people still want to protect passwords from sniffers, but WITHOUT the risk of handing untrusted third parties the power to frighten and annoy users away and without the performance hit of encrypting public content! there is no magic one-size-fits all solution that will suit every site! –  Nov 07 '13 at 18:53
  • 1
    SRP is not a better way to transmit passwords; it is a way to permit password-based authentication without transmitting either the password (and not even a password-equivalent in the sense that what is transmitted is not susceptible to a replay attack). –  Apr 18 '14 at 09:09
  • The guy attacks SSH public key without presenting something else as least as strong. Boo on him. – Joshua Jul 02 '19 at 03:45

2 Answers2

8

SRP is being implemented into SSL, so browsers are beginning to support it. Another option (albeit, much slower) is to run SRP in Javascript. Since the server supplies the javascript code, however, this is an attack point. So, it would have to be delivered over SSL, and the client must trust the server, which makes SRP with Javascript less than ideal.

There is more information on using SRP with OpenSSL, which seems fairly current.

For more information:
https://stackoverflow.com/q/2778629
http://srp.stanford.edu/download.html (includes patches for OpenSSL) http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol#Real_world_implementations
http://trustedhttp.org/wiki/Main_Page (has information on chrome and firefox support)

mikeazo
  • 2,837
  • 16
  • 29
  • SRP in javascript didn't seem to work at all in Chrome. Though IE did prompt me to permit "Java" ... strange – makerofthings7 Mar 18 '12 at 18:39
  • @makerofthings7, from what I saw in the last link I posted, it looks like chrome supports srp-tls – mikeazo Mar 18 '12 at 18:41
  • Yes, I would like to find a working implementation that uses httpsv as in "httpsv://tls-srp.test.trustedhttp.org" , but that link didn't work with my default settings (not sure if I need Dev mode) – makerofthings7 Mar 18 '12 at 18:43
  • 3
    I don't understand why anyone would deploy SRP in Javascript. What is the security threat that it is trying to defend against? If the server is malicious or compromised, it can send malicious Javascript that captures your password, so it doesn't help protect against a compromised server. If the server is not compromised, and if you're using SSL, then SRP in Javascript doesn't seem to have any security benefit over just sending a username and password over SSL and handling it appropriately on the server side. – D.W. Mar 19 '12 at 00:23
  • "browsers are beginning to support it" - I'm not aware of a single browser that supports SRP at this time. Are you? If you are, can you share some links to a modern browser that supports SRP? (I know there's a forked version of Chromium that supposedly supports SRP, but as far as I know, it is not in the mainstream codebase.) – D.W. Mar 19 '12 at 00:25
  • @D.W., correct, you must build chromium from source, so it is not mainstream yet, but that is the beginning. Hopefully it will be included in future releases. As for benefits of srp over javascript, they are the same as srp in general. Resistance to dictionary attacks (even for weak passwords) for an attacker who gains read-only access to the database, shared secret key after authentication, etc. – mikeazo Mar 19 '12 at 01:26
  • @makerofthings7, you'd probably have to build chromium from source and enable srp support for that page to work. – mikeazo Mar 19 '12 at 01:28
  • 1
    @makerofthings7, SRP does not provide resistance to dictionary attacks against an attacker who gains read-only access to the database. SRP stores what is essentially a hash of your password in the database. As far as a shared secret key after authentication, that is already provided by the standard approach of sending a username/password over SSL. – D.W. Mar 19 '12 at 01:57
  • 1
    "SRP does not provide resistance to dictionary attacks against an attacker who gains read-only access to the database." Indeed. If a database of users is "resistant to dictionary attacks", it means it cannot even be used to verify user passwords. IOW, this database is useless. – curiousguy Jul 12 '12 at 22:52
  • @D.W. SRP protects againts the server logging the password by mistake – Bruno Martinez Mar 21 '21 at 04:02
2

It can't. Browsers don't support SRP. To use SRP, both the browser and the site needs to support it. Until browsers support SRP, there's nothing you can do as a site operator to deploy it to protect your website.

D.W.
  • 99,525
  • 33
  • 275
  • 596
  • This is a somewhat unhelpful answer. Because if development, maintenance, and complexity are acceptably low, you'd want to support it on your website before browsers support it. That way, when browsers start supporting it, your users immediately benefit (and people can point browser developers at websites that support it as an argument for adding support for it). – mtraceur Aug 21 '20 at 19:03