The spy and the cipher