Published in 2013 by Britannica Educational Publishing (a trademark of Encyclopædia Britannica, Inc.) in association with Rosen Educational Services, LLC 29 East 21st Street, New York, NY 10010. Copyright © 2013 Encyclopædia Britannica, Inc. Britannica, Encyclopædia Britannica, and the Thistle logo are registered trademarks of Encyclopædia Britannica, Inc. All rights reserved. Rosen Educational Services materials copyright © 2013 Rosen Educational Services, LLC. All rights reserved. Distributed exclusively by Rosen Educational Services. For a listing of additional Britannica Educational Publishing titles, call toll free (800) 237-9932. First Edition Britannica Educational Publishing Rob Curley: Senior Editor, Science and Technology J.E. Luebering: Senior Manager Adam Augustyn: Assistant Manager Marilyn L. Barton: Senior Coordinator, Production Control Steven Bosco: Director, Editorial Technologies Lisa S. Braucher: Senior Producer and Data Editor Yvette Charboneau: Senior Copy Editor Kathy Nakamura: Manager, Media Acquisition Rosen Educational Services Nicholas Croce: Editor Nelson Sá: Art Director Cindy Reiman: Photography Manager Karen Huang: Photo Researcher Brian Garvey: Designer, Cover Design Introduction by Richard Barrington Library of Congress Cataloging-in-Publication Data Intelligence and counterintelligence: cryptography: cracking codes/edited by Rob Curley.— First edition. pages cm "In association with Britannica Educational Publishing, Rosen Educational Services." Includes bibliographical references and index. ISBN 978-1-62275-034-4 (library binding) 1. Cryptography—History. 2. Data encryption (Computer science) I. Curley, Robert. II. Title: Cryptography: cracking codes. Z103.I68 2013 005.8'2—dc23 2012035291 Manufactured in the United States of America On the cover, pp. i, iii: Binary code. Comstock/Thinkstock Cover (top front and back) © www.iStockphoto.com/Yucel Yilmaz; ba ck cover © www. iStockphoto.com/Alexander Putyata; pp. 1, 15, 30, 41, 50, 63, 75, 77, 78 © www.iStockphoto. com/Olga Yakovenko; pp.12, 27, 28, 38, 43, 44, 59, 60, 67 © www.iStockphoto.com/Molnár Ákos Contents Introduction viii Chapter 1: Cryptography, Cryptanalysis, and Cryptology 1 The Fundamentals of Codes, Ciphers, and Authentication 2 Cryptology in Private and Commercial Life 8 9 Identity Theft 12 Chapter 2: Cipher Systems 15 Transposition Ciphers 15 Substitution Ciphers 17 Playfair Ciphers 18 Vigenère Ciphers 20 Vernam-Vigenère Ciphers 24 William and Elizebeth Friedman 27 Product Ciphers 28 27 Chapter 3: Key Systems and Block and Stream Ciphers 30 Single-Key Cryptography 30 Two-Key Cryptography 31 Public-Key Cryptography 33 Secret-Sharing 35 RSA Encryption 36 Prime Numbers 38 Block and Stream Ciphers 39 32 Chapter4: Cryptanalysis 41 Basic Aspects 42 The Zimmermann Telegram 43 Types of Cryptanalysis 46 Chapter 5: Early Manual and Mechanical Cryptography 50 42 The First Systems 51 World Wars I and II 54 Alan Turing’s Bombe 59 Chapter 6: Modern Electronic Cryptography 63 The Impact of Electronics 64 Fibonacci’s Numbers 67 DES and AES 68 Conclusion 74 57 Glossary 75 Bibliography 77 Index 78 IntroductIon Binary code. Spaxiax/Shutterstock.com viii T he world of secret messages and code breakers might seem like something out of a high-tech espionage thriller, but the fasci- nation we have with cryptology and its methods in novels has been inspired by some very real practices. At times, these practices have helped change history, and while cryptology continues to adapt by using cutting-edge technology, it is a science—and to some extent an art—with roots that go back to ancient times. This book will let you in on the secrets of cryptography and code breaking, including their colourful history, the extremely intricate structures that go into cryptographic systems, and the high-level puzzle-solving required to break a code. In the process, you will see both sides of a cat-and-mouse game: those who are trying to devise impenetrable codes, and those who are trying to crack those codes. Given the long history of the practice, it is appropriate that the word cryptography comes from ancient Greek. It literally means “hidden writing,” and the practice is one of trying to conceal messages in plain sight. Cryptanalysis represents the other side of game: the practice of trying to decipher or forge messages written in someone else’s code. Cryptology is a broad description of the overall field, encompassing both cryptography and cryptanalysis. Talk of secret messages and code break- ers evokes images of spies and international diplomacy, and cryptology continues to play ix