The science and art of making and defeating locks