Hash Collision Attacks: How They Work and Why SHA-1 Was Broken