Notes on security and cryptography