This update is different from the previous ones. Here is a short list of changes in the current update:
- User registration and authorization.
- Automatic detection of the user's language.
- Modal dialogs now have a dimming overlay that blocks accidental clicks outside the dialog.
- The main menu is displayed above the dialogs.
- New parts for building ships have been created.
I'll start my story with why I spent an extra week building the registration system. We all know that almost every site has registration. But we don't always pay attention to the fact that our passwords travel in the clear. Even the https protocol cannot protect us from them being stolen. On almost every site, passwords are encrypted only on the server side. Mostly md5 is used, less often sha-1 and other algorithms. So what is the danger? (There is a good article in Hacker magazine: All methods of cracking MD5.) First, a site's password database can be stolen and all the user passwords in it recovered. Sometimes there is no encryption at all and passwords sit on the site in the clear. But let's get back to the browser: if the computer or browser is infected with a trojan/virus, or you accidentally leave your password on a friend's computer or somewhere else, the passwords will easily leak and attackers can use them. The more interesting part: everyone keeps saying the https protocol will save you. Alas, it won't. Yes, it protects against traffic interception, but not against trojans, viruses and plugins that can be installed in the browser or on the computer and have direct access to your passwords.
Well, are you ready? Let's look at some examples. We'll start our walk with the social network VKontakte (I could have picked another social network or just any site). But VKontakte pleases me most with its protection. Maybe after reading this text they will redo their authorization and registration. Today is March 5, 2016, and we are starting the test: open VKontakte and switch to debug mode with F12:

Step one: instead of a login, enter 123456789, and instead of a password, 987654321. Then let's see how this data is sent to the server (in Chrome, press F12, then go to the Network tab).

And what do we see? The data went over the http protocol in the clear, and without encryption too (this happens all the time; not everyone knows they have to type https:// manually to switch to a secure protocol). For a social network of this scale, that is very bad, because passwords travel in the clear and arrive to them in the clear as well. It is unclear how employees or the company will use them.
Let's see how things stand with us. Enter the login abc@mail.ru and the password 987654321.

The password doesn't look like its original form; it looks like MD5, but is it? (There are several dozen utilities, and you can check for yourself whether you can pull your real password out of this.)
But that is far from all. What happens if we try to log in again with our login and password? Enter the login abc@mail.ru and the password 987654321.

The password changed?! It may seem strange at first glance, but protecting your data requires an unusual approach.
To sum up: since we don't care what a person's actual password is, as long as the user can log in after entering their data, we can transform the password into another form and destroy its original structure. All passwords are encrypted on the client side (in the browser) and then again on the server side after sending. So the “real password” was encrypted before it was even sent to the server. To encrypt the password I used SHA-3 Keccak in a modified form, and also wrapped it in MD5 to give cracking enthusiasts a “visible ease”. Of course, this approach does not guarantee 100% protection; any system can be broken, but it makes getting access to your “real” password many times harder.
Project link:
play.dg8.ru