Migrate passwords from eZ Platform 2.5 to Ibexa 4.6

V2-BLOGPASSWORD-PNG-01

3 Jan 2025

MD5 was used in version 2.5 of eZ Platform. This is no longer the best solution for encrypting passwords.
The latest LTS version of Ibexa uses bcrypt. When migrating between versions of the application, the passwords in the database need to be migrated.

The differences

FeaturesMD5bcrypt
Type of algorithmCryptographic hash functionPassword hashing algorithm
Main objectiveCreate a digital fingerprint (hash)Hiding passwords securely
Resistance to collisionsVery low, easy to find collisionsVery high
SaltNot natively integrated (requires manual implementation)Natively integrated, unique salt by hashing
Cost factorNot applicableConfigurable, impacts calculation time and resistance to brute force attacks
Resistance to brute force attacksVery weak, vulnerable to rainbow table attacks and direct brute force attacksVery strong, thanks to salting and the cost factor
Computing speedVery fastIntentionally slow, configurable
Current useObsolete for password hashing, still used to verify file integrity (but not recommended for sensitive applications)Industry standard for password hashing
SecurityVery low, insecureVery high security

Migrating passwords from eZ Plaform 2.5 to Ibexa 4.6: the technical aspect

Migrating passwords from MD5 to bcrypt as part of an Ibexa upgrade requires a specific approach, as it is not possible to ‘unhash’ MD5 passwords. The strategy is to perform the migration when the user logs on:

  1. MD5 check: When a user attempts to log in, the system first checks whether the password matches the existing MD5 hash.
  2. Bcrypt hash and update: If the MD5 check is successful, the system hashes the password with bcrypt and updates the user record in the database with the new bcrypt hash. This means that only the bcrypt hash will be used for future logins.

Migrating from MD5 to bcrypt is a crucial step in strengthening the security of your Ibexa platform. By adopting bcrypt, you can effectively protect your users' data against modern attacks. The security of your site and your users depends on it.

Would you like to find out more and receive support for your eZ Platform to Ibexa migration project? Don't hesitate to contact us.