6.

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


Chapter 1
Technology and Terminology

The primary purpose of this chapter is to acquaint you with a core set of terms associated with the field of cryptology. You should note that your primary objective is to obtain a level of knowledge which provides the ability to develop and use practical encipherment techniques to hide the meaning of messages transmitted over different types of electronic mail systems. Many of the techniques we will cover are not unbreakable to a trained analyst; however, they will provide varying levels of message protection that can make it difficult and, in many cases, very time consuming to understand the meaning of a message. In fact, some practical techniques we will cover in this book may require more than 60 billion trials to correctly understand the meaning of a message. Because each trial could require the printing of an intercepted message, a 10-line message could conceivably require a person to scan 600 billion printed lines!

Although the United States National Security Agency (NSA), the United Kingdom’s MI5, and Russia’s modern version of the KGB have probably programmed supercomputers to use artificial intelligence in an attempt to understand the meaning of intercepted messages, few, if any, commercial organizations have the financial resources to obtain the required hardware to develop programs to perform similar operations. Thus, the more sophisticated techniques presented in this book should provide you with a mechanism to protect the meaning of your communications from the casual observer, the inadvertent observer, and most, if not all, intentional illicit intercepters.

To acquaint readers with the terminology associated with the field of cryptology, we will both discuss different terms as well as their meaning through the use of several examples. In doing so we will review the main types of ciphers that are covered in detail in succeeding chapters. When appropriate, we will discuss the use of different ciphers from a historical perspective; however, our intention is not to provide readers with information on the historical evolution of ciphers but to show some of their practical uses from a historical basis.

A secondary objective of this chapter is to discuss the subroutines and programs we will develop and include via program listings throughout this book. This discussion will acquaint readers with the rationale for selecting the C++ and BASIC programming languages that are used to develop subroutines and programs and file naming conventions which can facilitate the use of the subroutines and programs included in this book.

Ciphers Versus Codes

One of the major areas of confusion for many readers is the difference between a cipher system and a code system. Although both systems are designed to conceal information while it is transmitted, they do so using different substitution techniques.


If you’re a video buff and remember such war films as The Longest Day, Tora, Tora, Tora, and similar films, you noted the transmission of messages whose contents appear to be meaningless. Such messages as “Paul has a long arm,” “The soup is in the kitchen,” and “Ralph needs shoes,” for example, represent coded messages in which words and phrases are substituted for other words or phrases to disguise the meaning of the message. In other films, you may remember a soldier or sailor using equipment to intercept a message and preparing a punched paper tape containing the contents of the message. The paper tape was then placed into a special tape reader that read the tape and produced a new tape. The soldier or sailor would then read the message on the new tape and yell across the room, “Let’s get this message to the Captain” or a similar line.

Those movies illustrated the use of specially constructed decipherment machines which were designed to read enciphered messages and reproduce the original text of the message known as plaintext or cleartext. The intercepted message punched on paper tape consisted of a series of what appeared to be randomly picked characters, such as the sequence “QAFRT…” That character sequence represented an enciphered message in which each plaintext character in the message was replaced by a ciphertext character according to a predefined algorithm.


In a cipher system, the plaintext, which represents a set of data prior to encipherment, is operated upon without regard to their meaning. In a code system, words or phrases are replaced by other words or phrases to hide the meaning of a message. Thus, the message FIRE THE CORPORATE LAWYER might be transmitted as GJSF UIF OPSQPSBUF MBXZFS using a simple cipher discussed later in this chapter. When transmitted in a code, the message could become SELL THE CORPORATE DONKEY, assuming SELL was the code for FIRE and DONKEY was the code for LAWYER.

Because many code systems normally do not change the meaning of more than a few terms in a message, such systems immediately provide a hint as to the contents of a message. In addition, the observation of a series of messages can provide a reasonable set of clues that will enable someone to determine the meaning of coded messages. Another obstacle to the use of codes, especially when they are only used infrequently, is the requirement to have prior knowledge of all of the substitutions. Some code systems used by military and diplomatic personnel are based upon the creation of code books that may have tens of thousands of terms and their equivalent codes. Not only are such code books difficult and time consuming to prepare but, in addition, their distribution and replacement by a new code book if an existing book should become lost or compromised can create a logistical nightmare. Although still popular for military and diplomatic use in certain situations, the efficient use of a code system requires the development of the previously mentioned code book which provides the basis for encoding and decoding messages. In comparison, many cipher systems only require knowledge of one or a few items of information known as keys to encipher and decipher a message. Thus, from a practical point of view, encipherment and decipherment operations can be easier to perform than encoding and decoding operations associated with conventional code book-based systems, especially as the length of a message increases. In addition, many cipher systems can be expected to provide a higher level of message protection than obtained from the use of a code system. Due to the preceding, the focus of this book is upon different encipherment techniques.


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