8.

Learn Encryption Techniques with BASIC and C++
(Publisher: Wordware Publishing, Inc.)
Author(s): Gil Held
ISBN: 1556225989
Publication Date: 10/01/98

Previous Table of Contents Next


Decipherment

The process of converting or restoring ciphertext back into its original plaintext contents is known as decipherment. Figure 1.2 illustrates the decipherment process in a block diagram format. Decipherment (D) can be considered the inverse of the encipherment process, requiring the use of an algorithm which converts ciphertext back into its original plaintext. Decipherment is also controlled by a key (k), which is applied to ciphertext (y) to produce plaintext (x), such that x=Dk(y).


Figure 1.2  The decipherment process results in the creation of plaintext (x) by applying a decipherment algorithm (D) controlled by a key (k) against ciphertext (y) so that x=Dk(y).

You can obtain an appreciation for the decipherment process by deciphering the previously enciphered message. Assuming you have the key BURP and received the message LF DLE RS NUL, you would use modulo 2 subtraction to reconstruct the original plaintext message. Thus, an understanding of the decipherment process requires a brief overview of modulo subtraction.

Under modulo subtraction, if the minuend is greater than the subtrahend the result is obtained by subtracting the subtrahend from the minuend. If the minuend is less than the subtrahend, you would first add the value of the next base position to the minuend prior to subtracting the subtrahend. For example, under base 10 9-5 is 4, while 5-9 is 6 since a value of 10 is added to the minuend (5) prior to subtracting the subtrahend (9).

Since our previous encipherment was performed using modulo 2 addition, we will use modulo 2 subtraction to perform a decipherment operation. Table 1.3 illustrates the modulo 2 subtraction process for all four possible combinations per bit position.

Table 1.3 Modulo 2 Subtraction

0 0 1 1
0 1 0 1
0 1 1 0

Now that you have an appreciation for modulo 2 subtraction, let’s turn our attention to deciphering the previously enciphered message. If you are the recipient of the message, you would receive the enciphered text LF DLE RS NUL. Assuming you have the key BURP, you would then perform a modulo 2 subtract process to decipher the enciphered text into its original plaintext. This decipherment process is illustrated in Table 1.4.

Table 1.4 Deciphering the message LF DLE RS NUL with the key BURP using modulo 2 subtraction.

Enciphered text LF DLE RS NUL
0001010 0010000 0011110 0000000
8 Key B U R P
1000010 1010101 1010010 1010000
Deciphered text 1001000 1000101 1001100 1010000

Keys and Key Space

In examining Figure 1.1 and 1.2, the key—no pun intended—to enciphering and deciphering is the key that controls the operation of the enciphering and deciphering algorithms. Although a person may obtain a copy of an enciphered message and have knowledge of the algorithm used to encipher the message, you must use the correct key to successfully decipher the message. Thus, the number of possible values of a key, referred to as an algorithm’s key space, is an important consideration in selecting an enciphering algorithm. This is because an algorithm with a limited key space is very susceptible to a trial-and-error process in which different keys are applied in an attempt to decipher an intercepted message. For example, if a sequence of nine decimal digits is used to form a key, its key space is 1010, or 10 billion, key values.

Although it is relatively easy to program a computer to generate a series of 10-digit sequences to use at different times, it is probably not realistic to expect a mortal to remember those sequences. Thus, a tradeoff will occur between key space and practicality if we wish to develop ciphers that can be easily used in a manual process. In addition, from a practical point of view, it is many times easier to remember words or phrases instead of a sequence of digits. Thus, many of the cipher systems discussed in this book are based upon the use of an alphabetic key in the form of a word or phrase. This usually provides an increased retention capability over the use of a sequence of digits. Even if you automate the enciphering process through the use of a program executed on a personal computer, under certain situations you may prefer to use a word or phrase in place of a digit sequence to facilitate the use of the program.

Another reason for using alphabetic or alphanumeric keys instead of a key restricted to digits is the significant increase in the key space afforded by the use of alphabetic or alphanumeric keys. For example, a two-digit key provides 10*10, or 100, unique keys. In comparison, the use of two uppercase or two lowercase alphabetic characters in a key provides 26*26, or 676, unique keys, while the use of two alphanumeric characters in which alphabetic characters are limited to a single case results in 36*36, or 1,296, unique keys.


Previous Table of Contents Next


Learn Encryption Techniques with Basic and C++
Learn Encryption Techniques with BASIC and C++
ISBN: 1556225989
EAN: 2147483647
Year: 2005
Pages: 92
Authors: Gil Held

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net