0
$\begingroup$

So basically i have a set of float data, its value ranges from -1.3117 to 1.7956 and then i convert this data into 64 bit binary value(assuming it is originally 64 bit double float). After that, i convert it into 64 bit integer. I encrypt this data with an encryption algorithm. The cipher histogram shows the distribution of the data are uniform like these. enter image description here After that i calculate the cipher data's shannon information entropy value and i got around 15.0525 and 15.497477 for the plain data's shannon information entropy value.

What i want to ask is, from what i know that cipher data consist of 8 bit integer data ideal shannon information entropy value is close to 8 bit, so i thought that this 64 bit integer data ideal shannon information entropy value is must be close to 64 bit right?why did i get shannon information entropy value around 15 bit on both cipher and plain data despite the uniformy distributed histogram of the cipher data? i get that the plain data shannon information entropy value usually not close to the ideal value but i dont get why the cipher data shannon information entropy value is close to 15 bit not close to 64 bit.

$\endgroup$
3
  • $\begingroup$ How are you calculating/measuring these shannon information entropy values? $\endgroup$ Nov 19, 2020 at 16:59
  • $\begingroup$ @GordonDavisson i did just like in this formula of H(x) here en.wikipedia.org/wiki/Entropy_(information_theory) $\endgroup$ Nov 19, 2020 at 17:15
  • $\begingroup$ But what P(x_i) values are you using, and where did they come from? Also, what's the detailed original distribution of the data (not just by bucket, like you have in the graph, but how many distinct values are possible/represented), and how is it converted into integers? $\endgroup$ Nov 20, 2020 at 3:48

1 Answer 1

1
$\begingroup$

I guess that the question's data processing

  • Uses "64 bit binary value" as symbol of the plaintext.
  • Enciphers these with a 64-bit block cipher in ECB mode, and considers the symbols in the encrypted data flow to be the individual outputs of that block cipher.
  • Assimilates the observed/actual frequency of a symbol $i$ in an experimental data set to the probability $p_i$ it has for the source of that data set. Which of course is an approximation (argument: if we repeat the experiment we'll likely get different frequencies, even if the source is unchanged, thus the probabilities unchanged).
  • Applies the formula $\displaystyle H\ =\ \sum_{i\text{ with }p_i\ne0}p_i\,\log_2\left(\frac1p_i\right)$ for the per-symbol Shannon entropy of a source of independent symbols of known probabilities $p_i$, even though nothing in the question supports that hypothesis of independence of the symbols produced by the source.

Assuming the above, reversibility of the transformation made on the symbols implies that encryption leaves $H$ exactly unchanged. The $p_i$ summed are the same, only for different $i$. The discrepancy between the reported 15.497477 before encryption and 15.0525 after could come from basing the computation of the second value on output that is not the encryption of the input used for the computation of the first value.

And independently, what's computed is something about the data (I don't know a proper name) produced by a source, but we have no assurance that it's a fair approximation of the Shannon entropy per symbol of the source. Knowing the data set length and the actual number of possible symbols (which depends heavily on how the input symbols are gathered, and what their physical source is) would help build an informed opinion on that.

$\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.