Read an Excerpt
Chapter 6: What Is Encryption?
Code Making and Code Breaking
As long as there have been code makers, there have been code breakers. And the two have been locked in a competition for centuries, with each advance one side being matched by counter- advances on the other.
For people who use codes, the code-breaking efforts of cryptanalysts pose danger that is potentially larger than the danger of not using cryptography in first place. Without cryptography, you might be reluctant to send sensitive i mation through the mail, across a telex, or by radio. But if you think that have a secure channel of communication, then you might use it to transmit sec that should not be widely revealed.
For this reason, cryptographers and organizations that use cryptography routinely conduct their own code-breaking efforts to make sure that their codes are resistant to attack. The findings of these self-inflicted intrusions are not always pleasant. The following brief story from a 1943 book on cryptography demonstrates this point quite nicely:
[The importance of the part played by cryptographers in military operations was demonstrated to us realistically in the First World War. One instructive incident occurred in September 1918, on the eve of the great offensive against Saint-Mihiel. A student cryptographer, fresh from Washington, arrived at United States Headquarters at the front. Promptly he threw the General Staff into a state of alarm by decrypting with comparative ease a secret radio message intercepted in the American sector.
The smashing of the German salient at Saint-Mihiel was one of the most gigantic tasks undertaken by the American forces during the war. For years that salient had stabbed into the Allied lines, cutting important railways and communication lines. Its lines of defense were thought to be virtually impregnable. But for several months the Americans had been making secret preparations for attacking it and wiping it out. The state was set, the minutest details of strategy had been determined-when the young officer of the United States Military Intelligence spread consternation through our General Staff.
The dismay at Headquarters was not caused by any new information about the strength of the enemy forces, but by the realization that the Germans must know as much about our secret plans as we did ourselves-even the exact hour set for the attack. The 'intercepted' message had been from our own base. German cryptographers were as expert as any in the world, and what had been done by an American student cryptographer could surely have been done by German specialists.
The revelation was even more bitter because the cipher the young officer had broken, without any knowledge of the system, was considered absolutely safe and had long been used for most important and secret communications.*
Cryptograpby and Digital Computers
Modem digital computers are, in some senses, the creations of cryptography. Some of the first digital computers were built by the Allies to break messages that had been encrypted by the Germans with electromechanical encrypting machines. Code breaking is usually a much harder problem than code making; after the Germans switched codes, the Allies often took several months to discover the new coding systems. Nevertheless, the codes were broken, and many historians say that World War II was shortened by at least a year as a result.
Things really picked up when computers were turned to the task of code making. Before computers, all of cryptography was limited to two basic techniques: transposition, or rearranging the order of letters in a message (such as the Spartan's scythe), and substitution, or replacing one letter with another one. The most sophisticated pre- computer cipher used five or six transposition or substitution operations, but rarely more.
With the coming of computers, ciphers could be built from dozens, hundreds, or thousands of complex operations, and yet could still encrypt and decrypt messages in a short amount of time. Computers have also opened up the possibility of using complex algebraic operations to encrypt messages. All of these advantages have had a profound impact on cryptography.
In recent years, encryption has gone from being an arcane science and the stuff of James Bond movies, to being the subject of debate in several nations (but we'll focus on the case in the U.S. in the next few paragraphs). In the U.S. that debate is playing itself out on the front pages of newspapers such as The New York Times and the San Jose Mercury News.
* Smith, Laurence Dwight. cryptography. The Science of Secret Writing. Dover Publications, New York, 1941.
On one side of the debate are a large number of computer professionals, civil libertarians, and perhaps a majority of the American public, who are rightly concerned about their privacy and the secrecy of their communications. These people want the right and the ability to protect their data with the most powerful encryption systems possible.
On the other side of the debate are the United States Government, members of the nation's law enforcement and intelligence communities, and (apparently) a small number of computer professionals, who argue that the use of cryptography should be limited because it can be used to hide illegal activities from authorized wiretaps and electronic searches.
MIT Professor Ronald Rivest has observed that the controversy over cryptography fundamentally boils down to one question:
Should the citizens of a country have the right to create and store documents which their government cannot read?*
This chapter does not address this question. Nor do we attempt to explore the U.S. Government's claimed need to eavesdrop on communications, the fear that civil rights activists have of governmental abuse, or other encryption policy issues. Although those are interesting and important question--questions you should also be concerned with as a computer user--they are beyond the scope of this book. Instead, we focus on discussion of the types of encryption that are available to most UNIX users today and those that are likely to be available in the near future. If you are interested in the broader questions of who should have access to encryption, we suggest that you pursue some of the references listed in Appendix D, Paper Sources, starting with Building in Big Brother, edited by Professor Lance Hoffman.
What Is Encryption?
Encryption is a process by which a message (called plaintext) is transformed into another message (called ciphertext) using a mathematical function* and a special encryption password, called the key.
Decryption is the reverse process: the ciphertext is transformed back into the original plaintext using a mathematical function and a key. The process of encryption and decryption is shown in basic terms in Figure 6-1. Here is a simple piece of plaintext:
Encryption can make UNIX more secure. ...
Rivest, Ronald, speaking before the MIT Telecommunications Forum, Spring 1994. * Or any other government! * Although it may not be expressed as such in every case....