Computer and Network Security

Table of Contents

Lecture 15: Cryptography

Allows secure comms between parties when an attacker can intercept/modify their messages. Goals:

Terms:

Kerckhoffs’ Principle: when encrypting, separate algorithm from key. Assume attacker knows algorithm, keep key secret

Caesar cipher: shift letters in alphabet by a fixed amount

Cryptographic hashes:

Random numbers:

Blockchain:

Perfect encryption:

Symmetric cryptography

Uses single key to encrypt and decrypt. Properties:

One-time pad:

Stream ciphers:

Block ciphers:

Cipher block chaining:

Padding:

Signatures:

Asymmetric cryptography

Uses two keys: anyone encrypts with public key, only owner decrypts with private key

RSA:

Key management

Symmetric: key distribution center:

Asymmetric:

SSL and HTTPS

SSL (Secure Sockets Layer) ensures crypto protection for network connection on top of TCP (aka TLS) Goals:

Password storage

Hash password when storing.

Bruteforce solutions:

  1. Use salted hash:
    • when storing password, generate random string and concatenate with password before hashing
    • store salt with hash.
  2. Use slow hash: e.g. apply hash 1000 times