r/adventofcode • u/daggerdragon • Dec 04 '15
SOLUTION MEGATHREAD --- Day 4 Solutions ---
--- Day 4: The Ideal Stocking Stuffer ---
Post your solution as a comment. Structure your post like the Day Three thread.
14
Upvotes
View all comments
Show parent comment
1
u/Tandrial Dec 04 '15
Hash functions which are used for crypto, which MD5 was (is) should be resistant to a preimage attack, e.g. if you have a known output its difficult to find and input which produces that output. Difficult means that the method used should take at least the same time as brute-force.
For MD5 such an attack exists, however since we only care about the first 3 bytes of the output and not the whole thing the attack might take much longer than brute-force.