2
$\begingroup$

Would it be safe? Or is it susceptible to brute force attacks or something else?

$\endgroup$
4
$\begingroup$

A DES key is 56 bits. If we assume letters are ASCII encoded and take 8 bits each this means a DES key of only letters would be 7 letters long. Given that there are 26 letters in the roman alphabet we would have $26^7 \approx 2^{33}$ possible keys, or if we allow uppercase and lowercase, $52^7 \approx 2^{40}$ possible keys. Both keyspaces can quickly be enumerated with modern hardware and can easily be brute forced.

| improve this answer | |
$\endgroup$
  • 4
    $\begingroup$ By another reading of the question, we use 8 ASCII characters A-Z as key, the low-order bit of each is ignored so we end up with 14 possible values, the keyspace is $14^8\lessapprox2^{30.5}$; or $28^8\lessapprox2^{38.5}$ with lowercase. $\endgroup$ – fgrieu Sep 17 '18 at 13:44
-1
$\begingroup$

If the intention is to stuff as many letters into a 56 bit DES key as possible, then you can get 11 (and a bit) in if you ignore case. You can decode the ASCII values to reduce the bits necessary to represent the characters. Then 56/log(2;26) = 11.9.

So your key space would be 26^11 or 51.7 bits. That's almost full strength DES, but still low for today's attack hardware. And of course DES is deprecated.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.