# Calculating DES key knowing message before and after encryption [duplicate]

I've 8 bytes before encryption (for example: 01 02 03 04 05 06 07 08) and 8 bytes after DES encryption: 08 07 06 06 05 04 03 02 01. Is it possible to calculate the key?

• What you mean by DSA encryption? – kelalaka Sep 14 '19 at 22:32
• DES key can be searched within 25 seconds with special hardware and $2^{56}$ is it is quite achievable by supercomputers – kelalaka Sep 14 '19 at 22:43

A single p3.16xlarge EC2 instance is capable of evaluating $$369\times10^9 \approx 2^{38}$$ DES calls per second using hashcat.
This puts the maximum time to recover a key at around $$2^{56} / 369\times10^9 / 3600 \approx 54$$ hours. This costs a little over \$1300 at current pricings.