First implementation of attack_cipher()