1
$\begingroup$

I am trying to analyze symmetric block ciphers like DES, 3DES and AES, using Cryptool 2. I want to do a frequency analysis on each of these ciphers, in order to comment whether this is an effective way for cryptanalysis or not.

However, the ciphertext these ciphers produce comes in hex form: enter image description here

My question is - when performing frequency analysis on such ciphers, do I input the hex ciphertext or do I need to transform it into text? How can I comment on that (based on letter frequency or bit occurrence)?

$\endgroup$
15
  • 1
    $\begingroup$ Does this answer to your question? How can frequency analysis be applied to modern ciphers? $\endgroup$
    – kelalaka
    Commented Jul 2, 2020 at 14:28
  • $\begingroup$ @kelalaka I read that before asking the question, but I didn't quite understand. I'm testing a random plaintext in English. From what I understand, I can perform frequency analysis on hex mode, and need to find general frequencies on english texts in hex mode in order to compare? $\endgroup$
    – C-Bk
    Commented Jul 2, 2020 at 14:35
  • $\begingroup$ The frequency analysis on block cipher can work on block level. The data ( plaintext) in general is byte encoded. If one encrypts only one byte, then byte-level frequency works too. Of course, that requires non-randomized padding, too. In anyway, one need do compare 8 bytes for DES and 16 bytes for AES ciphertexts to observe a frequency due to the insecure mode ECB. If any other mode is used, like CBC and CTR mode then the modes have the standard Ind-CPA security and the attacker has no luck there $\endgroup$
    – kelalaka
    Commented Jul 2, 2020 at 14:38
  • 1
    $\begingroup$ One doesn't exactly decrypt the ciphertext, one finds the value. Standard definition of decryption requires the key. Here, we cannot say how the plaintext are formed. They can be a date, name as in the example of the link. It is hidden in your question. If one knows the distribution of the plaintext then with ECB mode used, they can determine the plaintext with great probability. See the articles\ on the bottom of the linked answer. $\endgroup$
    – kelalaka
    Commented Jul 2, 2020 at 14:50
  • 1
    $\begingroup$ @kelalaka: For you it is obvious that the frequencies for all symbols for these algorithms will be almost equal. But look at the goal in the OP: in order to comment whether this is an effective way for cryptanalysis or not. In my opinion, this is a reasonable task for a student - not to trust to what is said in a book, but to check if it really holds in particular case. $\endgroup$
    – mentallurg
    Commented Jul 2, 2020 at 20:36

1 Answer 1

1
$\begingroup$

My question is - when performing frequency analysis on such ciphers, do I input the hex ciphertext or do I need to transform it into text? How can I comment on that (based on letter frequency or bit occurrence)?

First of all, what you are looking at is a hexadecimal representation of the ciphertext. The ciphertext itself does not consist of hexadecimals, it is binary. Converting it to text makes very little sense; if any analysis has to be done it has to be performed over the binary data without any conversion to text.

We know that DES and AES are permutations over block sizes of 8 or 16 bytes. What you are showing is a DES or AES using mode of operation. Analysis should only be performed on the combination of the two. And you can actually find e.g. duplicate blocks when DES or AES is used in ECB mode. In any correctly used secure cipher mode they should of course be secure, and indistinguishable from random (IND-CCA/IND-CPA).

It doesn't make much sense to use the general frequency analysis over the cipher as the output does not even consist of characters. Generally analysis should not be performed willy-nilly; it is performed while keeping the characteristics of the cipher under investigation in mind. And this kind of leads to the answer...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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