In this paper, I show how genetic algorithms (GAs) - techniques for searching large solution spaces inspired by Darwinian evolution - can be applied to cryptanalysis ("code-breaking"). We briefly consider their use against simple substitution ciphers, and look in more detail at their application with the much harder problem of solving transposition ciphers. We find that they work pretty well, at least with modest key-lengths.