Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Hashing Method #5

Closed
bretcope opened this issue Jan 23, 2017 · 1 comment
Closed

Change Hashing Method #5

bretcope opened this issue Jan 23, 2017 · 1 comment

Comments

@bretcope
Copy link
Owner

We've been using md5 for file hashing, which is more or less fine, but cryptographically secure. I've been debating whether that matters. Yes, you can definitely intentionally create md5 collisions if you're being malicious. On the other hand, this is unlikely to be a problem when you're talking about trusted code (hopefully you trust your migrations).

The reason I picked md5 in the first place was to be compatible with the Stack Overflow migrator, but I already do line ending normalization differently, so there's no guarantee that hashes between the two migrators will match. Furthermore, I intend to add a mark-as-run command which will make transitioning from one migrator to the other easier.

Ultimately, there's no particularly good reason to pick md5, and people might question its use in a production environment (whether there's truly any risk or not). I think picking a different hash would be better. SHA-256 is a likely candidate.

@bretcope
Copy link
Owner Author

bretcope commented Feb 7, 2017

In the redesign branch, I decided to go with SHA256.

@bretcope bretcope closed this as completed Feb 7, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant