Friday, February 20, 2015

It's a secret (7)

I mentioned that the concept of substitution can be applied to words or phrases and not just letters. When it's used in this way the process tends to be referred to as a code rather than a cipher.  The codes can themselves be words (we might agree for example that "bear" means "night") or they may be random collections of letters (so "CFHN" might mean "office" for example).  Codes are generally considered more secure than ciphers since there is usually no pattern to them - meaning that if somehow you learn that CFHN means office it is of no help to you in finding out what "VKUP" means.  Ciphers on the other hand more often have some logic to them - so for example if you have established that cipher "j" is plaintext "e" this might lead you to suspect that ciphertext "k" is "f" and so on.  On the other hand, a cipher can be carried in your head, whereas a code needs a code book - so both approaches have their strengths and weaknesses.  An important point to make is that the same person or team was usually involved in encipherment and decipherment so they would be well aware of the weakness created by frequency distribution.  But what to do about it?  That's for next time.

No comments: