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?