Home > Articles > Security > Network Security

  • Print
  • + Share This
This chapter is from the book

5.3 Encryption for Data Protection

Section 5.2 introduced requirements for quality encryption products that, in particular, recommend the use of strong encryption with hard-to-guess secret keys. While this may sound like obvious advice, itÕs often harder to achieve than we might wish.

Strong encryption starts with a strong encryption algorithm, a computational procedure that either encrypts the plaintext data or converts encrypted data back to its plaintext. These algorithms use a secret key to control the encryption. A well-designed algorithm provides no way to decrypt some encrypted data without the correct key, except through a trial-and-error search. If the secret key is large enough, the search isn't practical.

The combination of these features—the strong algorithm and the long key—yields computationally secure encryption, that is, encryption that isn't practical to break. Good commercial encryption is based on computationally secure encryption. To understand what good encryption means, we will briefly examine the problem of bad encryption, the role of key length in cryptographic strength, and attack times on cryptographic keys.

Encryption algorithms tend to fall into two categories: stream ciphers and block ciphers. Most of the widely used modern algorithms are block algorithms: the old Data Encryption Standard (DES), the new Advanced Encryption Standard (AES), the International Data Encryption Algorithm (IDEA), Blowfish, and the CAST algorithm (created by Carlisle Adams and Stafford Tavares).

Stream ciphers were used in the electromechanical machines from the mid-20th century, including World War II. The best-known modern stream cipher is Rivest Cipher #4 (RC4), which is used in most Web browsers to protect e-commerce transactions. Although there isn't anything fundamentally weak in stream ciphers, it is difficult to use them safely. Microsoft chose RC4 to encrypt secure channels for Windows NT domains and in PPTP and encountered problems trying to use RC4 safely (see Section 11.4).

Figure 5.4 Block and stream ciphers Block ciphers, as shown on the left, encrypt data one block at a time. Stream ciphers, as shown on the right, encrypt the data one bit at a time. The stream cipher generates a key stream that encrypts the data by performing an exclusive-or between corresponding bits of the key stream and the bits of the plaintext.

Figure 5.4 illustrates the difference between block and stream ciphers. Block ciphers encrypt data in fixed-sized blocks. The cipher uses the encryption key to thoroughly scramble the plaintext block of bits to yield the ciphertext. If you change a single bit in the plaintext, it could change several bits in the ciphertext, and vice versa.

Stream ciphers encrypt a stream of data. The mechanical encryption machines would encrypt streams of letters that formed secret messages. Modern computer-based ciphers tend to encrypt streams of bits. The ciphers work in two stages. In the first stage, the algorithm takes the secret key and uses it to generate a stream of random bits. In the second stage, the algorithm encrypts the data bits by combining them one by one with the random bit stream using the exclusive-or operation. If we change a single bit in the plaintext, we will affect only that same bit in the ciphertext. This can lead to integrity weaknesses in protocols that use stream ciphers; an example appears in Section 11.4.

Shortcut Attacks on Encryption

Strong encryption algorithms are hard to construct. While serving as a deputy director of the NSA, William Crowell told Congress that the German Enigma machine from World War II could not be broken today, even with modern computers, and that the Allies' success against the Enigma relied on German mistakes as well as the Allies' smart code breakers. The Germans had the raw materials to achieve strong encryption, but they failed to put them together correctly. Their errors opened up shortcuts the Allies could use to crack their messages.

During the war, the Germans were largely convinced that the Enigma's code was uncrackable, and Crowell's testimony indicates that they weren't entirely unrealistic in their belief. The Enigma was broken through an unexpected coincidence: the Allies built machines to perform trial-and-error searches at unprecedented speeds, and the German coding procedures had weaknesses that made such trial-and-error searches practical. Those weaknesses introduced shortcuts into the decryption process, since not every possible encryption key needed to be considered. Although encryption technology has made incredible progress since World War II, weak encryption still shows up in commercial products.

The fatal flaw of much encryption software is best called hubris, an ancient Greek word for excessive pride and arrogance that leads a smart person to do something foolish. The foolish act in this case is for software developers to invent their own encryption algorithms. It is very difficult to construct a computationally secure algorithm. Homemade algorithms, even by large and profitable corporations, deserve to be treated with suspicion. Two particularly interesting examples of this emerged in the late 1990s. First, cryptographers uncovered weaknesses in encryption algorithms used for digital mobile phones. Second, people posted software to the Internet to crack the encryption used to control the viewing of videos sold on DVDs. Neither system used a well-known, proven algorithm. In both cases the algorithms had been home-grown and kept secret in an ultimately futile attempt to prevent attackers from cracking the encryption.

The simple solution to this problem is to use a strong, well-studied cryptographic algorithm. Such procedures are well known and easy to find. The first candidate is AES, the new, "advanced" encryption algorithm endorsed by the U.S. government for encrypting sensitive information in government and commercial applications. As of this writing, the AES has not been formally adopted as a Federal Information Processing Standard (FIPS), but this is considered almost certain to happen. Despite its newness, the AES provides a combination of speed and security that recommend it to almost any application. AES uses a 128-bit key, which presents attackers with a 127-bit average attack space. As of this writing, the principal shortcoming of AES is that few products have as yet incorporated it.

In practice, of course, the available software products don't always provide the exact choice we may want, but there are alternatives that provide reasonable security. The first is Triple DES, a variant of DES that uses double-length or triple-length secret keys. Although DES is relatively slow, especially when run three times for Triple DES, its security is well respected and has stood the test of time. Indeed, the only weakness anyone has attacked successfully is its relatively short 56-bit key length. Other respected algorithms include IDEA, RC4, Blowfish, and CAST.

An interesting footnote regarding DES is that it contains one well-known, though minor, shortcut. DES has a property, called complementation, which means that we can actually test two DES keys at a time when performing a trial-and-error attack. Each time we choose a key to try, we run the DES algorithm, and then we can test both the chosen key and its bit-by-bit inverse. So we actually need to run the algorithm only half as many times when performing a trial-and-error search. To compute the average attack space for DES, we subtract one bit as usual to account for searching half of the keys on average, and another bit to account for complementation. Thus, the average attack space for DES is 54 bits.

Trial-and-Error Attacks on Encryption

Aside from the successful wartime attacks against German codes, DES provides the best-known example of breaking a modern code by trial and error. Skepticism about its 56-bit key size emerged as soon as it was introduced. Shortly after DES was announced, cryptographers Whitfield Diffie and Martin Hellman outlined the design for a machine that could crack one DES-encrypted message per day. Although they did not actually build the machine, they described how such a thing could be built for $20 million using 1975 technology. While such a machine may have been impractical for most enterprises, there were certainly a few large nations, corporations, and criminal enterprises that could afford such a thing. But at the time, nobody had actually demonstrated that it was feasible to crack a DES-encrypted message.

The skeptics had time and progress on their side. In the 1960s, Gordon E. Moore looked at the emerging trends in computer circuits and noted that circuit costs, sizes, and execution times were dropping by roughly 50% every year. This general trend came to be called Moore's Law. The law's predictions aren't exact, but the general trend has continued to this day. A more recent restatement of Moore's Law said that the amount of computation available at a given price would double every 18 months. Computing became both faster and cheaper as time went on.

In Section 2.4, we looked at trial-and-error attacks on passwords; clearly Moore's Law was feeding the attack risk by the late 1970s. But it was not until the 1990s that public attacks on DES began in earnest. In 1993, Michael Wiener produced a detailed and convincing design for a $1 million DES-cracking machine that, in theory, could crack one key every 3.5 hours. In 1996, a group of cryptographers and others interested in computer security published a report summarizing the trends in brute force cracking technology, and indicated that DES was no longer safe for commercial applications. But DES cracking remained a theory until 1997, when a loose confederation of volunteers on the Internet cracked a DES message in 5 months using borrowed computing cycles. The next year, a much larger group of volunteers cracked a DES message in 39 days.

But this achievement was overshadowed in the summer of 1998, when the Electronic Frontier Foundation (EFF) unveiled their DES Cracker. The Cracker was a custom-built machine that, for $250,000, demonstrated a guess rate of 88 billion per second. In its first public demonstration it cracked a DES-encrypted message in three days. While it may be possible that an agency such as the U.S. National Security Agency (NSA) has a faster device for cracking keys, the DES Cracker has the highest guess rate of any publicly acknowledged device.

Theoretical Guess-Rate Limitations

The successful attacks on DES leave us with an unsettling question: just how many bits of entropy should a base secret have, if it must resist brute force attacks for a long time? In the mid-1990s, the NSA introduced the Skipjack encryption algorithm with 80-bit keys as a candidate to protect "sensitive but unclassified" government information. Noting public concern about 56-bit DES keys, the NSA offered Skipjack for nongovernment use as part of its unsuccessful Escrowed Encryption Standard. Skipjack was never widely adopted, however, because of public outrage regarding escrowed encryption plus a concern that 80 bits no longer gave enough of a safety margin against computational progress. Other commercial encryption algorithms like IDEA and RC4 were already widely used, and both relied on 128-bit keys. Financial institutions that still used DES relied on Triple DES constructions that used 112-bit or even 168-bit keys.

Moore's Law itself doesn't suggest an endpoint: the equation doesn't converge on some maximum value. Indeed, research in quantum computation suggests that we may someday build computers that use individual particles as logic elements. In such a world, only quantum physics itself can provide a convincing upper limit on trial-and-error attacks.

The physicist Seth Lloyd argues that computation speeds at that level are limited by the amount of energy poured into the computing system. If somehow we can build a perfectly efficient quantum computer at that level, then the machine could achieve over 1033 bit transitions per second on only one watt of power (keep in mind that a 32-bit processor operating at 1-gigahertz produces maybe 1011 transitions per second). At that rate, the 1-watt quantum computer could cover a space containing 113 bits every second.

Of course, this represents a theoretical ideal: there really aren't any machines that achieve anywhere close to that speed or efficiency, not even experimental quantum computers. But it's interesting to consider just how powerful a quantum key-searching computer could be. We can use that information to decide how many bits a secret key should be to defend against really outlandish attacks.

For example, imagine that we can redirect all of the sun's energy, and prevent it from warming the leaves of plants, Earth's oceans, Jupiter's atmosphere, or anything else within the solar system or beyond its borders. Instead, we channel that energy into the guessing process. We assume ideal conditions under which all of the energy is fed to state transitions that correspond to individual trial-and-error guesses. Using all of the sun's energy, we can sustain a rate of 2.33 x 1060 guesses per second, which covers a 201-bit search space every second. Given that it takes 25 bits to represent the number of seconds in a year, we see that an entire year of solar energy will exhaust a 226-bit search space. If we choose to be less greedy and use only the energy falling on Earth itself, then we can crack a 175-bit search space every second.

This suggests to some people that a base secret with a couple hundred bits should resist trial-and-error attacks for the foreseeable future. However, the physics of computation is a relatively new field and continues to evolve in both theory and practice. Some theoreticians find this estimate plausible, but it needs to stand the test of time.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020