Author Topic: Password migration to SHA256  (Read 7283 times)

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Password migration to SHA256
« on: October 29, 2011, 01:21:56 pm »
Planeshift has been using md5sum for a long time (just like most of the internet still does) but as it's well known md5 suffers from collisions and other issues which could even allow to identify the original password ( http://en.wikipedia.org/wiki/Md5#Security ) so we are going to migrate the game server passwords to sha256.
As we cannot just take the md5 and convert them to sha256 we will do a slow migration by having users input again the data so it will be possible to get these new hash to be used for account login.
These are the steps I plan to take in order to proceed on this migration:
1) registration and password recovery functionalities will start recording both md5sum and sha256sum hash in the server database
1.5) Game server will start accepting an additional field during login containing an unsalted sha256sum, around the same time svn clients will start sending these unsalted sha256sum (it's a tradeoff between security and ease. I'll explain more on the bottom). The server will store these unsalted sha256sum in it's database.
2) 0.5.8 release - Release clients will start sending unsalted sha256sum (same thing as 1.5), authentication is still done through the salted md5sum
2.5) The server starts accepting salted sha256sum for authentication, while retaining the previous authentication system when not provided the new data.
3) if there will be a 0.5.9 release clients will stop sending unsalted sha256sum and will start sending only salted ones, additionally md5sum will not be sent anymore. servers will use the sha256sum to authenticate if available else it will behave like with 0.5.8 clients and will store the unsalted sha256sum in it's database, if the client logging in is 0.5.8 or earlier md5sum will be used for autentication
4) 0.6.0 release sha256sum only will be used for autentication. clients earlier than 0.6.0 will be network incompatible (also for other reasons).
5) myplane will start using sha256 for autentication
6) registration of md5sum data will be halted in the registration/password recovery forms
7) the md5sum data will be deleted from the databases
8) migration complete

The risk of unsalted sha256sum is that it allows a man in the middle attack to your client.
In other words someone could listen to your communications between the client and the server and save for future use your sha256sum which is all someone needs to login, even though it's entirely useless to get back the original plain text password. Because of this fact using this easy method to convert password is *NOT* suggested on unsafe networks and an option will be provided in the login dialog to disable it (it will be enabled by default). If you know that your network is unsafe you are warmly suggested to untick this box and use the password recovery form from a safe location to add your sha256sum for the future, If you don't know or you know you are in a safe network you can untick it to increase security after the first login which will send your new password hash to the server (notice that till you don't rewrite your password in the box with a new client it won't be sent).
As an additional note: if your username is not a valid email anymore you are suggested during the migration period to correct this by contacting developers.

Enjoy playing planeshift. If you don't understand something of this please ask.

Currently step 1 is complete.
« Last Edit: December 23, 2011, 06:27:20 am by weltall »

Sen

  • Hydlaa Notable
  • *
  • Posts: 746
    • View Profile
Re: Password migration to SHA256
« Reply #1 on: October 29, 2011, 02:11:11 pm »
Did I understand it right that clients, who didn't log in between now and step 7 won't be able to log in afterwards?
.....also a saddle that won't pinch the tail. One day!

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Password migration to SHA256
« Reply #2 on: October 29, 2011, 02:13:41 pm »
actually step 4.
They will need to use the password recovery function in the registration page in order to be able to login again. (accounts not clients)
Also logging in is not enough you need to input again the password in your client so the client can do the sha256sum, till this won't be done just the md5sum password will be sent like now (and the server won't add the record for the new password sum hash)
« Last Edit: October 29, 2011, 02:19:18 pm by weltall »

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Password migration to SHA256
« Reply #3 on: October 29, 2011, 02:45:24 pm »
svn is at step 1.5 servers will follow soon

I'd like to add as a side note that anyone who registered or recovered the password after 7 july 2011 has already the new hash stored in the database so doesn't need to send it to the server again.

Sadie

  • Hydlaa Resident
  • *
  • Posts: 115
    • View Profile
Re: Password migration to SHA256
« Reply #4 on: October 30, 2011, 11:27:49 am »
Sorry, Weltall, but I didn't understand any of it.  Could you translate to layman's terms?
Sanrai
my name is Sanrai ;)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Password migration to SHA256
« Reply #5 on: October 30, 2011, 01:12:26 pm »
Briefly said: The currently used algorithm of password checksums is not most secure anymore (but still would require a remarkable effort to capture and crack them). The next version will use a much more secure algorithm but requires some small efforts ... in ideal case, staying active during the next months and regularly logging in.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

bilbous

  • Guest
Re: Password migration to SHA256
« Reply #6 on: October 30, 2011, 01:47:53 pm »
Basically ... log in with all your alt accounts -- especially the ones with email addresses that are no longer valid -- or create headaches for yourself and the administrators.

What is going to happen down the line with accounts that do not get updated?

Sadie

  • Hydlaa Resident
  • *
  • Posts: 115
    • View Profile
Re: Password migration to SHA256
« Reply #7 on: October 30, 2011, 02:05:42 pm »
  Thank you, LigH and bilbous, for shedding some light on this.  I just want to have fun with the game, not change parts of the program (e.g. find file"X" and do this and that).  Makes me very nervous . . . .
  And I echo the question of bilbous ...
Sanrai  :sorcerer:
my name is Sanrai ;)

Catlemur

  • Hydlaa Citizen
  • *
  • Posts: 424
  • Death or Glory
    • View Profile
Re: Password migration to SHA256
« Reply #8 on: October 30, 2011, 02:17:41 pm »
I was taking a break from the game (deleted it).Will my chars vanish into the black hole of data if I do not log in regularly.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Password migration to SHA256
« Reply #9 on: October 30, 2011, 02:20:19 pm »
you'll have to input again your password in the client if it was saved else the new one won't be sent. We are talking of the next released client not the current one (or self built clients when i say we are at step 1.5)

who loses this occasion will need to use the password recovery function from the registration page. That requires a still valid email to work.

Either methods are required only one time. So if you want to go easy just do the password recovery procedure and input your current (or a new one) password and you'll be fine.
All The new accounts and accounts which used the password recovery procedure since 7 july  have already the new password storage type employed.

bilbous

  • Guest
Re: Password migration to SHA256
« Reply #10 on: October 30, 2011, 02:42:09 pm »
You might want to put a notice on the game login screen as not everyone checks the forum.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Password migration to SHA256
« Reply #11 on: October 30, 2011, 03:29:28 pm »
after release

Sadie

  • Hydlaa Resident
  • *
  • Posts: 115
    • View Profile
Re: Password migration to SHA256
« Reply #12 on: October 30, 2011, 05:24:40 pm »
  How does one do the password recovery thing? And what if I have a new e-mail....? I don't want to lose my character..... sorry for needing simple answers......
Sanrai
my name is Sanrai ;)

bilbous

  • Guest
Re: Password migration to SHA256
« Reply #13 on: October 30, 2011, 05:33:33 pm »
RP Server
non RP

The first one is the one you most likely want to use.

If you cannot access the old email address you likely need to contact the administrator but someone might jump in with better information.


Aside to web admin: the side links to the password recovery and server on the zeroping register page link to fragnetics. I didn't check the others but they might be the same.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Password migration to SHA256
« Reply #14 on: October 30, 2011, 05:41:24 pm »
you'll need access to the email which registered the account in order to accomplish the recovery procedure.
thanks for noticing that problem going to fix it by redirecting to the same page as the main site