Epic: Security Hardening — Upgrade Password Hashing #151

Open
opened 2026-03-15 23:08:31 +00:00 by freemo · 0 comments
Owner

Background and Context

Player passwords are currently stored as MD5 hex digests (Digest::MD5.new.update(password).to_s) in both the GDBM passwords store and the ES PlayerCreated/UpdatePlayerPassword events. MD5 is cryptographically broken — rainbow tables and collision attacks make it trivial to reverse hashes. This Epic upgrades password storage to bcrypt with transparent migration of existing MD5 hashes.

Demonstrable Outcome

New passwords are stored as bcrypt hashes. Existing MD5 passwords are transparently upgraded to bcrypt on successful login. No player is locked out during the transition.

Acceptance Criteria

  • All new password storage uses bcrypt
  • Existing MD5 hashes are detected and upgraded on login
  • Digest::MD5 is no longer used for password hashing
  • bcrypt gem is in runtime dependencies
  • Both GDBM and ES password paths use bcrypt
## Background and Context Player passwords are currently stored as MD5 hex digests (`Digest::MD5.new.update(password).to_s`) in both the GDBM `passwords` store and the ES `PlayerCreated`/`UpdatePlayerPassword` events. MD5 is cryptographically broken — rainbow tables and collision attacks make it trivial to reverse hashes. This Epic upgrades password storage to bcrypt with transparent migration of existing MD5 hashes. ## Demonstrable Outcome New passwords are stored as bcrypt hashes. Existing MD5 passwords are transparently upgraded to bcrypt on successful login. No player is locked out during the transition. ## Acceptance Criteria - All new password storage uses bcrypt - Existing MD5 hashes are detected and upgraded on login - `Digest::MD5` is no longer used for password hashing - `bcrypt` gem is in runtime dependencies - Both GDBM and ES password paths use bcrypt
freemo added this to the v1.0.0 milestone 2026-03-15 23:19:39 +00:00
freemo self-assigned this 2026-03-16 01:26:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#151
No description provided.