one-time pad (OTP)

https://en.wikipedia.org/wiki/One-time_pad

  1. plaintext is paired with a random secret key (also referred to as a one-time pad ).
  2. Then, each bit or character of the plaintext is encrypted by combining it with the corresponding bit or character from the pad using modular addition.

Example:

			h       e       l       l       o  message
   7 (h)   4 (e)  11 (l)  11 (l)  14 (o) message
+ 23 (X)  12 (M)   2 (C)  10 (K)  11 (L) key
= 30      16      13      21      25     message + key
=  4 (E)  16 (Q)  13 (N)  21 (V)  25 (Z) (message + key) mod 26
      E       Q       N       V       Z  → ciphertext

Untitled

Stream Cipher

https://en.wikipedia.org/wiki/Stream_cipher