2 points · by alhenaadams · 14y ago · 6 comments
essentially you create a huge solution space problem only the right username/password combo can solve in reasonable time.
i bet that samsonite, I'm way off, but please tell me how to protect user data with a client side only js/css3/html5/bootstrap site? I want an open source drop in js login script we can all verifiably agree is secure so this doesn't happen to me.
If you want everything to be client-side then you're out of luck. The client controls everything, and tweaks of the Javascript, to invert the logic of the password check, will break everything. You could have the password be the decryption key for the rest of the code to run, but I don't understand the goal.
What's the threat model? Who's is going to try to do what?
> For one, in the one you outlines, anagrams give the same hash value
It's even worse: Only the number of occurences of a given character matter for the value of the hash. So "correct horsebatterystaple" gives the same as "aabcceeeehlooprrrrsstttty". Permutation of letters does not change the output at all, making a brute force attack extremely viable.
I can only guess that the rawTransforms.json and userHashTransform.json are kept by some server, and the user is then authenticated against this? If so, why not use some standard method? (bcrypt, scrypt?)
In any case, creating your own hash function or making up your own secure authentication procedure should generally be considered a big red flag. Chances are, whatever authentication issue you're trying to solve, there is already a standard way for it: Stick to it.
Remember: It's trivial to create a security scheme you cannot break, but very hard to create one that somebody else cannot break.
If I change the additions in my algorithm to multiplications I can avoid some issues others have pointed out.
I'm not familiar with Github pages, but it seems one cannot store anything on the server-side, it's just HTML+JS. If nothing is sent to any server, there does not seem anything to authenticate or protect from anyone.