Encryption 101

 

Cryptography is a set of techniques used to transform information into an alternate format that can later be reversed.  This alternate format is referred to as the ciphertext and is typically created using a crypto algorithm and a crypto key.  The crypto algorithm is simply a mathematical formula that is applied to the information you want to encrypt.  The crypto key is an additional variable injected into the algorithm to ensure that the ciphertext is not derived using the same computational operation every time the algorithm processes information. 

Let's say the number 42 is extremely important to you, and you want to guard this value from peering eyes. You create the following crypto algorithm to encrypt this data:

   data/crypto key + (2 x crypto key)

This process relies on two important pieces: the crypto algorithm itself and the crypto key.  Both are used to create the ciphertext, which is a new numeric value.  To reverse the ciphertext and produce an answer of 42, you need to know both the algorithm and the key.  There are less secure crypto algorithms known as Caesar ciphers that do not use keys, but they typically are not used because they do not have the additional security of a crypto key.  You only need to know the algorithm for a Caesar cipher in order to decrypt the ciphertext. 

Note:  Julius Caesar is credited as being one of the first people to use encryption.  Using the substitution method, he shifted each letter of his message to the letter three places down in the alphabet.  He replaced all his letter As with Ds, Bs with Es, and so on.  Because his generals were the only people aware of his algorithm, he considered his messages safe from untrusted messengers.  This type of encryption is commonly referred to as the Caesar cipher.

 

Because encryption uses mathematical formulas, a symbiotic relationship exists among the following:

  • The algorithm
  • The key
  • The original data
  • The ciphertext

Knowing any three of these pieces allows you to derive the fourth.  The exception is knowing the combination of the original data and the ciphertext.  If you have multiple examples of both, you might be able to discover the algorithm and the key.

(Source:  "Security Complete" 2nd Edition, Sybex")