Hawkynt

3DES (Triple DES)

Triple Data Encryption Standard applies DES encryption three times in EDE mode. Supports both EDE2 (112-bit effective security) and EDE3 (168-bit key) modes. Deprecated by NIST in 2019.

Properties

Property Value
Category Block Ciphers
Sub-category Block Cipher
Security status ❌ Broken
Complexity Intermediate
Inventor IBM (based on DES)
Year 1978
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/block/3des.js

Parameters

Parameter Supported values
Key sizes 16 bytes (128 bits) to 24 bytes (192 bits) in steps of 8 bytes
Block sizes 8 bytes (64 bits)

Security

Status: ❌ Broken

Known vulnerabilities

Issue Description Mitigation
Meet-in-the-middle attack Effective security reduced to 112 bits instead of theoretical 168 bits Use AES-128 or higher for new applications
Small block size 64-bit block size vulnerable to birthday attacks Avoid encrypting large amounts of data with single key

Documentation

References

Test vectors

8 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” DarkCrypt DES-EDE vector 1/zero

Field Value
key 000000000000000000000000000000000000000000000000
input 0000000000000000
expected 8ca64de9c1b123a7

Vector 2 β€” DarkCrypt DES-EDE vector 2/incr

Field Value
key 000102030405060708090a0b0c0d0e0f1011121314151617
input 0001020304050607
expected 58ed248f77f6b19e

Vector 3 β€” DarkCrypt DES-EDE vector 3/incr2

Field Value
key 0102030405060708090a0b0c0d0e0f101112131415161718
input 1011121314151617
expected bcbdf997a68ca618

Vector 4 β€” 3DES EDE2 mode - educational test vector

Field Value
key 0123456789abcdef23456789abcdef01
input 0123456789abcdef
expected a6bb373e196b375e

Vector 5 β€” 3DES EDE3 mode - educational test vector

Field Value
key 0123456789abcdef23456789abcdef01456789abcdef0123
input 0123456789abcdef
expected f2afd84ee809e2b5

Vector 6 β€” 3DES EDE2 mode - all zeros plaintext

Field Value
key 01010101010101010101010101010101
input 0000000000000000
expected 8ca64de9c1b123a7

Vector 7 β€” 3DES EDE2 mode - FIPS 46-3 test vector

Field Value
KeySize 16
key 0123456789abcdef23456789abcdef01
input 0123456789abcdef
expected a6bb373e196b375e

Vector 8 β€” 3DES EDE3 mode - three distinct keys

Field Value
KeySize 24
key 0123456789abcdef23456789abcdef01456789abcdef0123
input 0123456789abcdef
expected f2afd84ee809e2b5

← All algorithms