fix bug in cipher, add encrypted message