Answer the question
In order to leave comments, you need to log in
How to create a secure authorization algorithm?
Hello. I rummaged through a bunch of sites in search of an example of secure authorization in PHP, but did not find anything sensible (or the material is already outdated).
But still sketched some algorithm .. Connoisseurs, please tell me where his problem areas are and how to solve them.
So:
Answer the question
In order to leave comments, you need to log in
Can you implement something similar:
https://en.wikipedia.org/wiki/Salted_Challenge_Res...
Well, firstly, it is worth understanding what is the difference between authentication and authorization - from the outside, such a question looks rather ridiculous. Secondly, if https is considered an insecure environment, you can forward Diffie-Hellman keys and encrypt traffic with AES, but this is for complete paranoids, and you can also screw HMAC-SHA256 ... sha1 (sha1 (whatever)) from the point of view of cryptography full "pe". Usually it is customary to make backends stateless and store all information within the user session, salted and encrypted. And, directly, the passwords themselves in BCrypt / SCrypt etc.
Authentication in this case may look like this
: 1. Keys are exchanged
2. The person sends his login-password to the server via an encrypted channel
3. In response, it receives the user session object, which is stored in
cookies the need for session storage.
4. Optionally, CSRF tokens are generated within the user session.
5. Optionally, all traffic needs to be escaped, including all sorts of JSONP and so on. Angular generally from the box requires all JSONP to be prefixed with such a miracle ")]}',\n"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question