I second Hyla's nomination of The Code Book. It also has exercises in breaking examples of the codes from Caesar to RSA public key, which had a prize for the first to break all 10 (which has gone now). There is a similar book by the same author, The Science of Secrecy, but this is a watered down version of the same material published to cover the TV program based on the original book. Colleagues who have read this have been disappointed but your mileage may vary.