Vernam Cipher
The Vernam Cipher uses an encryption key (or One Time Pad) which must be equal or longer in characters than the plaintext. It should be random and be used only once. The plaintext and the key are combined to produce the cipher text. The message can then be decrypted with the key and the cipher text.
Both parties would need to meet up to exchange the key, however you can imagine using a random book and starting the message with a page and line number. The Vernam Cipher uses ASCII binary values and the XOR logic gate. If you have 2 inputs (A & B) then the XOR will produce an output only when A or B have an input BUT NOT BOTH.
Example
Perfect Security
The Vernam Cipher is described as having perfect security. This means an eavesdropper would not, by gaining knowledge of the ciphertext but not of the key, be able to improve their guess of the plaintext even given unlimited computing power. Cryptanalysis will not produce any meaningful results because the distribution of any frequency analysis will be evenly distributed. This assumes that the key:
- Must be truly random
- Must be as long as the plaintext
- Must never be reused in whole or part
- Must be kept secret
Computational Security
An encryption method is considered to be computationally secure if it is safe to assume that no known attack can break it in a practical amount of time. This relaxes perfect security by allowing security to fail with tiny probability, and by only considering efficient attacks. Apart from the Vernam Cipher every encryption method could be brute forced eventually given unlimited processing power and time.
If a super computer can check one key per clock cycle it could check 280 keys in one year. This is 1,208,925,819,614,629,174,706,176 different keys. However the number of keys it could check in the whole time from the big bang until now (14 billion years) would be 2112. Therefore keys which have 128 bits (2128) should be computationally secure.
Even RSA encryption could be broken with unlimited time & processing power. It uses the product of 2 large prime numbers (atleast 512 digits) in its algorithm. This is easily calculated, however identifying which 2 numbers have been used for a given product is much harder than it sounds. The 2 prime numbers cannot be close together . In 2009, computer scientists using factorisation were able to discover the primes within a 768-bit number, but it took almost two years and hundreds of computers to factor it. If it was on a single machine they estimate it would have taken 1500 years, the scientists also estimated that it would take 1,000 times longer to break a 1,024-bit encryption key, which was originally used for online transactions. Now we use 2048 or 4096 bits for online transactions.