📜 ⬆️ ⬇️

EDS-based authentication

Already several topics addressed the problems of building a secure authentication mechanism for an insecure connection. Below is a discussion scheme using asymmetric cryptography. This approach will allow you to authenticate with the server, never giving the server a password, either during registration or during authentication. As always, there will be a demonstration and source codes. To whom this topic is interesting, please under the cat.

Previously, we have already considered several options:The proposed authentication mechanism uses the same protocol as the Rutoken solution. The main difference is that all cryptographic operations are performed programmatically, and the private key is generated based on the password. Both solutions use elliptic curve cryptography (ECC). ECC is cryptographically stronger than RSA, which allows shorter keys to be used, and as a result, reduces performance requirements. So:

Check in.
Authentication.
Attached is a demonstration . In the preparation of the example, a library written by Stanford students was used. Special thanks to the good man Martynenko Alexander , who unfortunately does not have an invite to Habr, for the software implementation of generating a key pair and generating an EDS using the algorithm of GOST R 34.10-2001 in the attached example.

Of course, all these examples are just examples. For their "combat" use, you must first think carefully and pay more attention to various "trifles." However, the very existence of various secure authentication protocols leads to questions. Why are passwords still transmitted in clear? Why are the passwords stored in the database in the open form or in the form of hashes without salt? When communicating with some representatives of large online services about the security of their accounts, I have repeatedly heard the question - And where is our benefit? So nevertheless, is there a benefit in the security of your users?

')

Source: https://habr.com/ru/post/123372/


All Articles