-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication improvement: Prevent cleartext passwords being sent to server #1190
Comments
the approach followed to address this ticket could be probably the same of #1176 siimply the password used by the user will be password = scrypt(possibly_reused_password) |
Hi all, that's the suggested scrypt implementation to be used within GlobaLeaks from the Cryptography mailing list. -------- Forwarded Message -------- On Wed, Mar 11, 2015 at 02:20:42PM +0000, Alfonso De Gregorio wrote:
The uses of PBKDF2-HMAC-SHA-256 in scrypt are not performance-critical. This might be the most suitable implementation of scrypt in JavaScript: https://github.com/dchest/scrypt-async-js Its performance test: http://dchest.github.io/scrypt-async-js/demo.html Alexander |
this is implemented in the end2end with a pass of scrypt before the receiver's password change and before the login submit. @evilaliv3 I add this to the e2e todo |
@origliante is the authentication scheme specified somewhere? I would be happy to take a look at it. I believe that the idea of having a challenge response mechanism based on public key based signing could be a valid option. |
it's still not specified; the specification should be studied as addition to the application security document. |
anyway @hellais what I want to address with this ticket is simply to have a mechanism that not make use in possibility to get the cleartext password choosen by the receiver; i want simply to avoid that a node whould to be in possibility to reuse the password of the user to access other user services and this has been solved by our specification of having the client do:
this, that is part of our end2end solution and has already been implemented in the end-to-end branch, solves the issue I opened. |
Is this what you mean: https://github.com/globaleaks/GlobaLeaks/blob/feature/end2end/client/app/scripts/e2e.js#L5 ? I believe some precautions still need to be taken when using the node salt (like it being of poor entropy or even being null). Implementing what I propose above would be a matter of doing what is described in section "7. Public Key Authentication Method: "publickey" of RFC4252 |
wait, i'm not saying your proposal is not right, but its not relevant to this ticket that i consider closed by what we agreed during the hackaton that is what i written in the last comment. fabio also suggested a different protocol that if i not remember wrong is more standard in relation to a web application than ssh that also if standard is more specific. |
@hellais you are suggesting having the user store a key on their machine and then load it into the browser for authentication correct? From my understanding it is desirable to keep the receiver from remembering anything other than a passphrase. HOWEVER, if the receiver is already using a PGP key why not make it easier for them to authenticate... @evilaliv3 in lieu of public key based auth, we could use the Secure Remote Password (SRP) protocol for handling passphrase based authentication – or at least the passphrase side of authentication. SRP is an interactive protocol that only relies on a client passphrase. Conceptually it is very similar to passing a hashed and salted token to the server, but a passive or active observer can take no information away from observing a successful login (something a static salt does not protect against.) RFC 2945 provides more detail:
Improvements to the protocol are described in RFC 5054. I have some personal experience with this protocol, but I do not believe that the protocol makes it easy to pick security parameters. The specification provides a few, but I have no idea what sort of properties the primes provide. There are many implementations of SRP in python and JS. In my opinion, it is a moot point to focus on javascript based authentication until the loaded scripts can be trusted, which seems like a long way away... |
@NSkelsey: correct if i'm wrong but i think that given the fact that we have Tor or TLS we would have no benefit of SRP as both the channel would anyhow provide the same properties. The main idea here was simply not make the cleartext password land on the server but simply a scrypt(password, node_salt) this way even if the user will reuse hello world on all the servers an attacker would have to build rainbowtables to got the initial password. Obviously this is not intended to protect the authentication on the node as the password for the server will be password_for_the_server scrypt(password_for_the_user, node_salt), but at least if the user has reused the password_for_the_user on more nodes the node could not impersonificate the user on the other servers. got the point? @fpietrosanti what do you think? |
@evilaliv3 Yes, with the regards to authentication i agree too that SRP is the ideal way to go for authentication, as per analysis already done in past, with some small improvement to the the standard RFC where i triggered peer analysis on cryptography mailing list (see bitwiseshiftleft/sjcl#214 && symeapp/srp-client#8 && mozilla/node-srp#28), but that has never been done due to other complexity with client-side pgp. In the perfect/ideal world we would use SRP6a with scrypt() improvement relying on an underlying additional independent/unauthenticated TLS exchange as per digitalbazaar/forge#81 and sqs/tlslite#4 but that would require a lot of additional crypto work. I may suggest to integrate the OpenPGP.js library in our workflow, without touching current cleartext authentication (or the simple-to-be-implemented proposal you've done), this will probably break everything and cause months of hard-work only to make it working in a reasonably way, then as a last topic we'll handle authentication improvement? |
@evilaliv3 you are right that TLS protects from eavesdroppers and everything on top of it is just extra. If there is an active attacker in the channel then the user is doomed anyway. However, if a GL node relies on a tor2web relay then with just But in the medium term run with @fpietrosanti I think supporting a second factor for authentication is a better route for strong authentication. Many websites are starting to support FIDO's U2F protocol, which relies on hardware security tokens. It is unclear if Firefox (which would mean the Tor browser) will eventually support the protocol, but it is still a possibility. I think for the committed groups that use GL this is a safer option to use in addition to passwords (and while slightly off topic, worth bringing up). It also means you could give journalists something nice to put on their key chain! |
estimate, please |
@fpietrosanti / @NSkelsey: with @vecna we agreed that to do this and given the fact that the scrypt process require a salt that we will implement the protocol that i suggestsed. the authentication will work as follow:
for what relates to the whistleblower instead there will a per node salt as now exported in /node. the salts so will stop to be secrets but we will benefit anyhow of:
i'm going to apply this changes along with the implementation of #1176; both are requirement to the implementation of the end2end encryption. |
@evilaliv3 this seems reasonable. Definitely going in the right direction. |
i've an important doubt in the migration;
i would suggest to have:
the part problematic will be the migration as it would require to handle the special condition of having to do the fallback on the legacy authenticator for the first login so that a lot of the old code should stay anyhow in plae on an handler /authentication-legacy were to switch from the current server hash (that is a script with default argument used in the python signature try new login; if the answered salt is empty proceed with legacy login on /authentication-legacy this will leak which are the user that are still not using the old authenticatiion but is the only way to guarantee the migratiion. |
@NSkelsey: this could be a nice to have to already backport in devel. |
No backports for you! |
This is implemented and finalized in the browsercrypto branch and it's documentation is part of writing the browsercrypto specs; then will follow updating the application security document. |
Notes on SRP from discussion todaySRP 6a + storage of password’s related material + https://lists.randombit.net/pipermail/cryptography/2015-March/007120.html Support scrypt into SRP6a in order to avoid weak password storage symeapp/srp-client#8 Authentication improvement: Prevent cleartext passwords being sent to server #1190 (comment) Thinbus Javascript Secure Remote Password (SRP) https://bitbucket.org/simon_massey/thinbus-srp-js |
It would be interesting (and important) to improve the authentication mechanism implemented by globaleaks by preventing cleartext password being sent to the server.
_n.b._ this idea does not replace password hashing+salting on serverside, but simply want to avoid that the server knows the cleartext password (possible reused by the user so making the server itself not in possibility to stole reused password)
Current user password (e.g. "helloworld") reach the server in clear-text, the server stores the a hash salted with a secret salt. this way the second time that it get a password, it verify it be re-salting with the stored salt. this protect by rainbow tables attacks but makes the server in possibility to reuse "helloworld" on other accounts of the user.
The idea is that the server should provide also a public salt so that the client would never send the password in a clear-text format.
Authentication will act as following:
The reason for a public salt in addition to a private salt is to not disclose the user salt making possible to speed up rainbow tables attacks.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: