An introduction to cryptography