I used a mix of TDD and REPL-driven development committing after each green and each refactoring.
What I did was tinkering in the REPL to get rough versions of encode, decode and decipher functions.
This kind of tinkering is getting more and more fun, the more I get used to working in the REPL.
Once I had the rough version I just copied it directly on the code, stabilized it with some tests and started to refactor it
until it seemed a bit more readable to me.