Triple DES

Last updated
Triple Data Encryption Algorithm
3des-overall-view.png
3DES overall view
General
First published1981
Derived from DES
Cipher detail
Key sizes 112 or 168 bits
Block sizes 64 bits
Structure Feistel network
Rounds 48 DES-equivalent rounds
Best public cryptanalysis
Lucks: 232 known plaintexts, 2113 operations including 290 DES encryptions, 288 memory; Biham: find one of 228 target keys with a handful of chosen plaintexts per key and 284 encryptions

In cryptography, Triple DES (3DES or TDES), officially the Triple Data Encryption Algorithm (TDEA or Triple DEA), is a symmetric-key block cipher, which applies the DES cipher algorithm three times to each data block. The Data Encryption Standard's (DES) 56-bit key is no longer considered adequate in the face of modern cryptanalytic techniques and supercomputing power. A CVE released in 2016, CVE-2016-2183 disclosed a major security vulnerability in DES and 3DES encryption algorithms. This CVE, combined with the inadequate key size of DES and 3DES, led to NIST deprecating DES and 3DES for new applications in 2017, and for all applications by the end of 2023. [1] It has been replaced with the more secure, more robust AES.

Contents

While the US government and industry standards abbreviate the algorithm's name as TDES (Triple DES) and TDEA (Triple Data Encryption Algorithm), [2] RFC 1851 referred to it as 3DES from the time it first promulgated the idea, and this namesake has since come into wide use by most vendors, users, and cryptographers. [3] [4] [5] [6]

History

In 1978, a triple encryption method using DES with two 56-bit keys was proposed by Walter Tuchman; in 1981 Merkle and Hellman proposed a more secure triple key version of 3DES with 112 bits of security. [7]

Standards

The Triple Data Encryption Algorithm is variously defined in several standards documents:

Algorithm

The original DES cipher's key size of 56 bits was generally sufficient when that algorithm was designed, but the availability of increasing computational power made brute-force attacks feasible. Triple DES provides a relatively simple method of increasing the key size of DES to protect against such attacks, without the need to design a completely new block cipher algorithm.

A naive approach to increase strength of a block encryption algorithm with short key length (like DES) would be to use two keys instead of one, and encrypt each block twice: . If the original key length is bits, one would hope this scheme provides security equivalent to using key bits long. Unfortunately, this approach is vulnerable to meet-in-the-middle attack: given a known plaintext pair , such that , one can recover the key pair in steps, instead of the steps one would expect from an ideally secure algorithm with bits of key.

Therefore, Triple DES uses a "key bundle" that comprises three DES keys, , and , each of 56 bits (excluding parity bits). The encryption algorithm is:

That is, DES encrypt with , DES decrypt with , then DES encrypt with .

Decryption is the reverse:

That is, decrypt with , encrypt with , then decrypt with .

Each triple encryption encrypts one block of 64 bits of data.

In each case the middle operation is the reverse of the first and last. This improves the strength of the algorithm when using keying option 2 and provides backward compatibility with DES with keying option 3.

Keying options

The standards define three keying options:

Keying option 1
All three keys are independent. Sometimes known as 3TDEA [16] or triple-length keys. [17]
This is the strongest, with 3 × 56 = 168 independent key bits. It is still vulnerable to meet-in-the-middle attack, but the attack requires 22 × 56 steps.
Keying option 2
K1 and K2 are independent, and K3 = K1. Sometimes known as 2TDEA [16] or double-length keys. [17]
This provides a shorter key length of 56*2 or 112 bits and a reasonable compromise between DES and Keying option 1, with the same caveat as above. [18] This is an improvement over "double DES" which only requires 256 steps to attack. NIST has deprecated this option. [16]
Keying option 3
All three keys are identical, i.e. K1 = K2 = K3.
This is backward compatible with DES, since two operations cancel out. ISO/IEC 18033-3 never allowed this option, and NIST no longer allows K1 = K2 or K2 = K3. [16] [13]

Each DES key is 8 odd-parity bytes, with 56 bits of key and 8 bits of error-detection. [9] A key bundle requires 24 bytes for option 1, 16 for option 2, or 8 for option 3.

NIST (and the current TCG specifications version 2.0 of approved algorithms for Trusted Platform Module) also disallows using any one of the 64 following 64-bit values in any keys (note that 32 of them are the binary complement of the 32 others; and that 32 of these keys are also the reverse permutation of bytes of the 32 others), listed here in hexadecimal (in each byte, the least significant bit is an odd-parity generated bit, it is discarded when forming the effective 56-bit keys):

01.01.01.01.01.01.01.01, FE.FE.FE.FE.FE.FE.FE.FE, E0.FE.FE.E0.F1.FE.FE.F1, 1F.01.01.1F.0E.01.01.0E, 01.01.FE.FE.01.01.FE.FE, FE.FE.01.01.FE.FE.01.01, E0.FE.01.1F.F1.FE.01.0E, 1F.01.FE.E0.0E.01.FE.F1, 01.01.E0.E0.01.01.F1.F1, FE.FE.1F.1F.FE.FE.0E.0E, E0.FE.1F.01.F1.FE.0E.01, 1F.01.E0.FE.0E.01.F1.FE, 01.01.1F.1F.01.01.0E.0E, FE.FE.E0.E0.FE.FE.F1.F1, E0.FE.E0.FE.F1.FE.F1.FE, 1F.01.1F.01.0E.01.0E.01, 01.FE.01.FE.01.FE.01.FE, FE.01.FE.01.FE.01.FE.01, E0.01.FE.1F.F1.01.FE.0E, 1F.FE.01.E0.0E.FE.01.F1, 01.FE.FE.01.01.FE.FE.01, FE.01.01.FE.FE.01.01.FE, E0.01.01.E0.F1.01.01.F1, 1F.FE.FE.1F.0E.FE.FE.0E, 01.FE.E0.1F.01.FE.F1.0E, FE.01.1F.E0.FE.01.0E.F1, E0.01.1F.FE.F1.01.0E.FE, 1F.FE.E0.01.0E.FE.F1.01, 01.FE.1F.E0.01.FE.0E.F1, FE.01.E0.1F.FE.01.F1.0E, E0.01.E0.01.F1.01.F1.01, 1F.FE.1F.FE.0E.FE.0E.FE, 01.E0.01.E0.01.F1.01.F1, FE.1F.FE.1F.FE.0E.FE.0E, E0.1F.FE.01.F1.0E.FE.01, 1F.E0.01.FE.0E.F1.01.FE, 01.E0.FE.1F.01.F1.FE.0E, FE.1F.01.E0.FE.0E.01.F1, E0.1F.01.FE.F1.0E.01.FE, 1F.E0.FE.01.0E.F1.FE.01, 01.E0.E0.01.01.F1.F1.01, FE.1F.1F.FE.FE.0E.0E.FE, E0.1F.1F.E0.F1.0E.0E.F1, 1F.E0.E0.1F.0E.F1.F1.0E, 01.E0.1F.FE.01.F1.0E.FE, FE.1F.E0.01.FE.0E.F1.01, E0.1F.E0.1F.F1.0E.F1.0E, 1F.E0.1F.E0.0E.F1.0E.F1, 01.1F.01.1F.01.0E.01.0E, FE.E0.FE.E0.FE.F1.FE.F1, E0.E0.FE.FE.F1.F1.FE.FE, 1F.1F.01.01.0E.0E.01.01, 01.1F.FE.E0.01.0E.FE.F1, FE.E0.01.1F.FE.F1.01.0E, E0.E0.01.01.F1.F1.01.01, 1F.1F.FE.FE.0E.0E.FE.FE, 01.1F.E0.FE.01.0E.F1.FE, FE.E0.1F.01.FE.F1.0E.01, E0.E0.1F.1F.F1.F1.0E.0E, 1F.1F.E0.E0.0E.0E.F1.F1, 01.1F.1F.01.01.0E.0E.01, FE.E0.E0.FE.FE.F1.F1.FE, E0.E0.E0.E0.F1.F1.F1.F1, 1F.1F.1F.1F.0E.0E.0E.0E,

With these restrictions on allowed keys, Triple DES has been reapproved with keying options 1 and 2 only. Generally the three keys are generated by taking 24 bytes from a strong random generator and only keying option 1 should be used (option 2 needs only 16 random bytes, but strong random generators are hard to assert and it's considered best practice to use only option 1).

Encryption of more than one block

As with all block ciphers, encryption and decryption of multiple blocks of data may be performed using a variety of modes of operation, which can generally be defined independently of the block cipher algorithm. However, ANS X9.52 specifies directly, and NIST SP 800-67 specifies via SP 800-38A [19] that some modes shall only be used with certain constraints on them that do not necessarily apply to general specifications of those modes. For example, ANS X9.52 specifies that for cipher block chaining, the initialization vector shall be different each time, whereas ISO/IEC 10116 [20] does not. FIPS PUB 46-3 and ISO/IEC 18033-3 define only the single block algorithm, and do not place any restrictions on the modes of operation for multiple blocks.

Security

In general, Triple DES with three independent keys (keying option  1) has a key length of 168 bits (three 56-bit DES keys), but due to the meet-in-the-middle attack, the effective security it provides is only 112 bits. [16] Keying option 2 reduces the effective key size to 112 bits (because the third key is the same as the first). However, this option is susceptible to certain chosen-plaintext or known-plaintext attacks, [21] [22] and thus it is designated by NIST to have only 80  bits of security. [16] This can be considered insecure, and, as consequence Triple DES has been deprecated by NIST in 2017. [23]

Logo of the Sweet32 attack Sweet32.svg
Logo of the Sweet32 attack

The short block size of 64 bits makes 3DES vulnerable to block collision attacks if it is used to encrypt large amounts of data with the same key. The Sweet32 attack shows how this can be exploited in TLS and OpenVPN. [24] Practical Sweet32 attack on 3DES-based cipher-suites in TLS required blocks (785 GB) for a full attack, but researchers were lucky to get a collision just after around blocks, which took only 25 minutes.

The security of TDEA is affected by the number of blocks processed with one key bundle. One key bundle shall not be used to apply cryptographic protection (e.g., encrypt) more than 64-bit data blocks.

Recommendation for Triple Data Encryption Algorithm (TDEA) Block Cipher (SP 800-67 Rev2) [13]

OpenSSL does not include 3DES by default since version 1.1.0 (August 2016) and considers it a "weak cipher". [25]

Usage

As of 2008, the electronic payment industry uses Triple DES and continues to develop and promulgate standards based upon it, such as EMV. [26]

Earlier versions of Microsoft OneNote, [27] Microsoft Outlook 2007 [28] and Microsoft System Center Configuration Manager 2012 [29] use Triple DES to password-protect user content and system data. However, in December 2018, Microsoft announced the retirement of 3DES throughout their Office 365 service. [30]

Firefox and Mozilla Thunderbird [31] use Triple DES in CBC mode to encrypt website authentication login credentials when using a master password.

Implementations

Below is a list of cryptography libraries that support Triple DES:

Some implementations above may not include 3DES in the default build, in later or more recent versions.

See also

References and notes

  1. Barker, Elaine; Roginsky, Allen (2019-03-01). "Transitioning the use of cryptographic algorithms and key lengths" (PDF). NIST SP 800–131Ar2 (Rev2 ed.). Gaithersburg, MD: NIST Publications: 7. doi:10.6028/nist.sp.800-131ar2. Archived (PDF) from the original on 2019-05-11.{{cite journal}}: Cite journal requires |journal= (help)
  2. "Triple DES Encryption". IBM. Retrieved 2010-05-17.
  3. Alanazi, Hamdan. O.; Zaidan, B. B.; Zaidan, A. A.; Jalab, Hamid A.; Shabbir, M.; Al-Nabhani, Y. (March 2010). "New Comparative Study Between DES, 3DES and AES within Nine Factors". Journal of Computing. 2 (3). arXiv: 1003.4085 . Bibcode:2010arXiv1003.4085A. ISSN   2151-9617.
  4. "Cisco PIX 515E Security Appliance Getting Started Guide: Obtaining a DES License or a 3DES-AES License" (PDF). Cisco. 2006. Archived (PDF) from the original on 2016-02-07. Retrieved 2017-09-05.
  5. "3DES Update: Most Banks Are Done, But..." ATM & Debit News. 2007-03-29. Archived from the original on 2013-05-10. Retrieved 2017-09-05.
  6. RFC 2828 and RFC 4949
  7. Merkle, R. and M. Hellman, “On the Security of Multiple Encryption”, Communications of the ACM, vol. 24, no. 7, pp. 465–467, July 1981.
  8. Karn, P.; Metzger, P.; Simpson, W. (September 1995). The ESP Triple DES Transform. doi: 10.17487/RFC1851 . RFC 1851.
  9. 1 2 "ANSI X9.52-1998 Triple Data Encryption Algorithm Modes of Operation" . Retrieved 2017-09-05. Extends ANSI X3.92-1981 Data Encryption Algorithm.
  10. "ANSI Standards Action" (PDF). Vol. 39, no. 46. ANSI. 2008-11-14. Archived (PDF) from the original on 2017-09-06. Retrieved 2017-09-05.{{cite magazine}}: Cite magazine requires |magazine= (help)
  11. "FIPS PUB 46-3: Data Encryption Standard (DES)" (PDF). United States Department of Commerce. Oct 25, 1999. Archived (PDF) from the original on 2003-04-05. Retrieved 2017-09-05.
  12. "Announcing Approval of the Withdrawal of Federal Information Processing Standard (FIPS) 46–3..." (PDF). Federal Register . 70 (96). 2005-05-19. Archived (PDF) from the original on 2008-09-17. Retrieved 2017-09-05.
  13. 1 2 3 Barker, Elaine; Mouha, Nicky (November 2017). "NIST Special Publication 800-67 Revision 2: Recommendation for the Triple Data Encryption Algorithm (TDEA) Block Cipher". NIST. doi: 10.6028/NIST.SP.800-67r2 .{{cite journal}}: Cite journal requires |journal= (help)
  14. NIST to Withdraw Special Publication 800-67 Revision 2 https://csrc.nist.gov/news/2023/nist-to-withdraw-sp-800-67-rev-2
  15. "ISO/IEC 18033-3:2010 Information technology -- Security techniques -- Encryption algorithms -- Part 3: Block ciphers". ISO. December 2010. Retrieved 2017-09-05.
  16. 1 2 3 4 5 6 Barker, Elaine (January 2016). "NIST Special Publication 800-57: Recommendation for Key Management Part 1: General" (PDF) (4 ed.). NIST. Archived (PDF) from the original on 2016-02-07. Retrieved 2017-09-05.
  17. 1 2 "The Cryptography Guide: Triple DES". Cryptography World. Archived from the original on 2017-03-12. Retrieved 2017-09-05.
  18. Katz, Jonathan; Lindell, Yehuda (2015). Introduction to Modern Cryptography. Chapman and Hall/CRC. p. 223. ISBN   9781466570269.
  19. NIST Special Publication 800-38A, Recommendation for Block Cipher Modes of Operation, Methods and Techniques, 2001 Edition (PDF)
  20. "ISO/IEC 10116:2006 Information technology -- Security techniques -- Modes of operation for an n-bit block cipher" (3 ed.). February 2006. Retrieved 2017-09-05.
  21. Merkle, Ralph; Hellman, Martin (July 1981). "On the Security of Multiple Encryption" (PDF). Communications of the ACM . 24 (7): 465–467. CiteSeerX   10.1.1.164.251 . doi:10.1145/358699.358718. S2CID   11583508. Archived from the original (PDF) on 2013-02-10. Retrieved 2013-11-15.
  22. van Oorschot, Paul; Wiener, Michael J. (1990). A known-plaintext attack on two-key triple encryption. EUROCRYPT'90, LNCS 473. pp. 318–325. CiteSeerX   10.1.1.66.6575 .
  23. "Update to Current Use and Deprecation of TDEA". nist.gov. 11 July 2017. Retrieved 2 August 2019.
  24. "Sweet32: Birthday attacks on 64-bit block ciphers in TLS and OpenVPN". sweet32.info. Retrieved 2017-09-05.
  25. Salz, Rich (2016-08-24). "The SWEET32 Issue, CVE-2016-2183". OpenSSL . Retrieved 2017-09-05.
  26. "Annex B Approved Cryptographic Algorithms – B1.1 Data Encryption Standard (DES)". EMV 4.2: Book 2 – Security and Key Management (4.2 ed.). EMVCo. June 2008. p. 137. Archived from the original on 2017-07-18. Retrieved 2009-03-21. The double-length key triple DES encipherment algorithm (see ISO/IEC 18033-3) is the approved cryptographic algorithm to be used in the encipherment and MAC mechanisms specified in Annex A1. The algorithm is based on the (single) DES algorithm standardised in ISO 16609.
  27. Daniel Escapa's OneNote Blog, Encryption for Password Protected Sections, November 2006.
  28. "Encrypt e-mail messages – Outlook – Microsoft Office Online". office.microsoft.com. Archived from the original on 2008-12-25. Applies to: Microsoft Office Outlook 2007
  29. Microsoft TechNet product documentation, Technical Reference for Cryptographic Controls Used in Configuration Manager, October 2012.
  30. "Admin Portal". portal.office.com. Retrieved 2023-03-14.
  31. Mozilla NSS source code. See Explanation of directory structure (especially the introductory and "security" sections) for background information.

Related Research Articles

<span class="mw-page-title-main">Advanced Encryption Standard</span> Standard for the encryption of electronic data

The Advanced Encryption Standard (AES), also known by its original name Rijndael, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001.

In cryptography, a block cipher is a deterministic algorithm that operates on fixed-length groups of bits, called blocks. Block ciphers are the elementary building blocks of many cryptographic protocols. They are ubiquitous in the storage and exchange of data, where such data is secured and authenticated via encryption.

<span class="mw-page-title-main">Cipher</span> Algorithm for encrypting and decrypting information

In cryptography, a cipher is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. An alternative, less common term is encipherment. To encipher or encode is to convert information into cipher or code. In common parlance, "cipher" is synonymous with "code", as they are both a set of steps that encrypt a message; however, the concepts are distinct in cryptography, especially classical cryptography.

<span class="mw-page-title-main">Data Encryption Standard</span> Early unclassified symmetric-key block cipher

The Data Encryption Standard is a symmetric-key algorithm for the encryption of digital data. Although its short key length of 56 bits makes it too insecure for modern applications, it has been highly influential in the advancement of cryptography.

<span class="mw-page-title-main">Symmetric-key algorithm</span> Algorithm

Symmetric-key algorithms are algorithms for cryptography that use the same cryptographic keys for both the encryption of plaintext and the decryption of ciphertext. The keys may be identical, or there may be a simple transformation to go between the two keys. The keys, in practice, represent a shared secret between two or more parties that can be used to maintain a private information link. The requirement that both parties have access to the secret key is one of the main drawbacks of symmetric-key encryption, in comparison to public-key encryption. However, symmetric-key encryption algorithms are usually better for bulk encryption. With exception of the one-time pad they have a smaller key size, which means less storage space and faster transmission. Due to this, asymmetric-key encryption is often used to exchange the secret key for symmetric-key encryption.

In cryptography, an initialization vector (IV) or starting variable is an input to a cryptographic primitive being used to provide the initial state. The IV is typically required to be random or pseudorandom, but sometimes an IV only needs to be unpredictable or unique. Randomization is crucial for some encryption schemes to achieve semantic security, a property whereby repeated usage of the scheme under the same key does not allow an attacker to infer relationships between segments of the encrypted message. For block ciphers, the use of an IV is described by the modes of operation.

<span class="mw-page-title-main">Block cipher mode of operation</span> Cryptography algorithm

In cryptography, a block cipher mode of operation is an algorithm that uses a block cipher to provide information security such as confidentiality or authenticity. A block cipher by itself is only suitable for the secure cryptographic transformation of one fixed-length group of bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.

<span class="mw-page-title-main">Ciphertext</span> Encrypted information

In cryptography, ciphertext or cyphertext is the result of encryption performed on plaintext using an algorithm, called a cipher. Ciphertext is also known as encrypted or encoded information because it contains a form of the original plaintext that is unreadable by a human or computer without the proper cipher to decrypt it. This process prevents the loss of sensitive information via hacking. Decryption, the inverse of encryption, is the process of turning ciphertext into readable plaintext. Ciphertext is not to be confused with codetext because the latter is a result of a code, not a cipher.

The meet-in-the-middle attack (MITM), a known plaintext attack, is a generic space–time tradeoff cryptographic attack against encryption schemes that rely on performing multiple encryption operations in sequence. The MITM attack is the primary reason why Double DES is not used and why a Triple DES key (168-bit) can be brute-forced by an attacker with 256 space and 2112 operations.

<span class="mw-page-title-main">Tiny Encryption Algorithm</span> Block cipher

In cryptography, the Tiny Encryption Algorithm (TEA) is a block cipher notable for its simplicity of description and implementation, typically a few lines of code. It was designed by David Wheeler and Roger Needham of the Cambridge Computer Laboratory; it was first presented at the Fast Software Encryption workshop in Leuven in 1994, and first published in the proceedings of that workshop.

<span class="mw-page-title-main">DES-X</span> Block cipher

In cryptography, DES-X is a variant on the DES symmetric-key block cipher intended to increase the complexity of a brute-force attack. The technique used to increase the complexity is called key whitening.

In cryptography, a weak key is a key, which, used with a specific cipher, makes the cipher behave in some undesirable way. Weak keys usually represent a very small fraction of the overall keyspace, which usually means that, a cipher key made by random number generation is very unlikely to give rise to a security problem. Nevertheless, it is considered desirable for a cipher to have no weak keys. A cipher with no weak keys is said to have a flat, or linear, key space.

<span class="mw-page-title-main">CBC-MAC</span> Message authentication code algorithm

In cryptography, a cipher block chaining message authentication code (CBC-MAC) is a technique for constructing a message authentication code (MAC) from a block cipher. The message is encrypted with some block cipher algorithm in cipher block chaining (CBC) mode to create a chain of blocks such that each block depends on the proper encryption of the previous block. This interdependence ensures that a change to any of the plaintext bits will cause the final encrypted block to change in a way that cannot be predicted or counteracted without knowing the key to the block cipher.

Disk encryption is a special case of data at rest protection when the storage medium is a sector-addressable device. This article presents cryptographic aspects of the problem. For an overview, see disk encryption. For discussion of different software packages and hardware devices devoted to this problem, see disk encryption software and disk encryption hardware.

In cryptography, Galois/Counter Mode (GCM) is a mode of operation for symmetric-key cryptographic block ciphers which is widely adopted for its performance. GCM throughput rates for state-of-the-art, high-speed communication channels can be achieved with inexpensive hardware resources.

Institute of Electrical and Electronics Engineers (IEEE) standardization project for encryption of stored data, but more generically refers to the Security in Storage Working Group (SISWG), which includes a family of standards for protection of stored data and for the corresponding cryptographic key management.

In cryptography, key wrap constructions are a class of symmetric encryption algorithms designed to encapsulate (encrypt) cryptographic key material. The Key Wrap algorithms are intended for applications such as protecting keys while in untrusted storage or transmitting keys over untrusted communications networks. The constructions are typically built from standard primitives such as block ciphers and cryptographic hash functions.

In cryptography, format-preserving encryption (FPE), refers to encrypting in such a way that the output is in the same format as the input. The meaning of "format" varies. Typically only finite sets of characters are used; numeric, alphabetic or alphanumeric. For example:

The following outline is provided as an overview of and topical guide to cryptography:

In cryptography, a Key Checksum Value (KCV) is the checksum of a cryptographic key. It is used to validate the key integrity or compare keys without knowing their actual values. The KCV is computed by encrypting a block of bytes, each with value '00' or '01', with the cryptographic key and retaining the first 6 hexadecimal characters of the encrypted result. It is used in key management in different ciphering devices, like SIM-cards or Hardware Security Modules (HSM).