Computer security involves cryptography to provide secure communication. Cryptography has two main components: encryption to hide messages and authentication/integrity to verify user identity and message integrity. There are requirements for secure communication including secrecy, authentication, and message integrity. Cryptographic algorithms like DES and AES are used along with keys to encrypt/decrypt data. Public key cryptography uses different keys for encryption and decryption allowing secure key exchange.