0
$\begingroup$

Basically, i want to encrypt standard ecg data with resolution of 11 bit mostly come from MIT-BIH Arrhythmia Database. The sample point values i saw are decimal like enter image description here.

Suppose that i just want to do simple xor encryption with a set of random generated integer number. How do i accomplish xor of double/float with these integer number?

  • I already tried by converting the sample point and the random number into 64 bit binary according to ieee754 standard, but there will be a case of the resulting xor values will be NaN (too big or too smal values with all 1 in exponent part) hence i cant get the float value or plot the encrypted data(because NaN is not a value) to visualize the signal before and after encryption.
  • I also already thought of converting the double/float into integers first by multiplying it by 10^N and floor it down but i dont know what is the appropriate N for all ecg data cases because i might have data loss for some sample point cases such as 0.0009823 with N=100 will become 0. I had hunch that to determine the appropriate N depends on the resolution of the ecg data but after reading some related literature i still dont found the answer.

So what i would like to know is what is the best approaches?and what is the most conventional way of encrypting double/float value of ecg data like that?

$\endgroup$
9
  • 1
    $\begingroup$ What are you trying to visualize after encryption? Encrypted data generally looks random, so there's little value in plotting it $\endgroup$ – Aman Grewal Nov 13 '20 at 13:12
  • $\begingroup$ i would like to visually see how big is the difference between encrypted data and the plaintext data and also i would like to calculate the encrypted data histogram, coefficient correlation, and information entropy $\endgroup$ – Muhammad Fauzi Nov 13 '20 at 13:24
  • $\begingroup$ You've got 64/32-bit (double/float respectively) binary data in. You bitwise XOR that with the random value. You get a random 64/32-bit value out. out, it might not be a valid floating point number (could be ±INF or a NAN). Treat it all as unsigned integers, use that to take the statistics you're interested in. $\endgroup$ – SAI Peregrinus Nov 13 '20 at 14:13
  • $\begingroup$ Your first approach is the best approach. Encrypted data isn't supposed to be able to be graphed. Do you want to weaken the encryption so that you can graph it? $\endgroup$ – user253751 Nov 13 '20 at 20:40
  • 1
    $\begingroup$ @MuhammadFauzi encryption encrypts bytes, not floats. Did you consider drawing a histogram of the bytes? $\endgroup$ – user253751 Nov 14 '20 at 18:53

Your Answer

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

Browse other questions tagged or ask your own question.