Modern cryptography refers to a field of applied mathematics whose purpose is to secure electronic data. At its simplest, cryptography takes input m and performs operations on it, returning result n. M will either be impossible to determine from n, or it will require knowledge of a secret key to determine m from n.
Building blocks of cryptography include:
- A hash function (not to be confused with a hash table) takes an arbitrary input and returns a fixed-length output in such a way that minute changes in input will almost certainly produce major changes in the output.
- A block cipher takes input of a fixed length and renders it unreadable to anyone who does not have knowledge of a secret key.
- A stream cipher takes input of an arbitrary length and processes it with a pseudo-random keystream (a string of pseudo-random numbers initialized with a secret key) to render it unreadable without knowledge of the key.
Cryptography is used in such protocols as TLS, SSL, and SSH, and is the basis for any secure electronic activity.