Sun. Jan 22nd, 2023

Ciphers, one time pads and hashes

A cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. The goal is to reversibly alter data to make it unreadable to anyone who does not possess the key to decipher it.

One-time pads are a type of cipher which uses a unique key that is at least the same length as the message to be encrypted. The key must be pre-shared (i.e. known to both the sender and the receiver) and should not be re-used, as this would compromise the security.

Hashes are mathematical functions which processes data, reducing entire files to a single (long) number. The algorithms are designed to ensure that it is impossible to predict what changes to a file would result in a particular output. Note that as hashes reduce data to a single value, they are irreversible, and can not be used to re-engineer the original data.