News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Pattern / Decryption  (Read 2020 times)

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Pattern / Decryption
« on: September 08, 2016, 01:30:06 pm »
Hi Guys,
I have spend a lot of money buying some measurement hardware and i find myself with a software for window that came with that thing that sucks!
Especially the export function is very shitty because they not output everything it has measured and need a lot of clicks to do so.
Now i am trying to read their own archive file to that i can export everything how i want and i am not dependant on that stupid software.
The archive seems simple enough with a lot of space between data so i don't believe there is any compression and there is some Unicode Text in plain view but i can not make out how they have stored the values.
It seems that all numbers are stored in blocks of 8 Bytes and I tracked down some measurements in cm to my list below.
Note that the program input is in cm (centimeters) and my decimal values are in cm as well so maybe 0.0001cm is actually just a 1mm.

0           00 00 00 00 00 00 00 00
0.0001   8D ED B5 A0 F7 C6 B0 3E
0.0002   8D ED B5 A0 F7 C6 C0 3E
0.0003   53 E4 10 71 73 2A C9 3E
0.0004   8D ED B5 A0 F7 C6 D0 3E
0.001   F1 68 E3 88 B5 F8 E4 3E
0.01           2D 43 1C EB E2 36 1A 3F
0.1           FC A9 F1 D2 4D 62 50 3F
1           7B 14 AE 47 E1 7A 84 3F
2           7B 14 AE 47 E1 7A 94 3F
3           B8 1E 85 EB 51 B8 9E 3F
4           7B 14 AE 47 E1 7A A4 3F
5           9A 99 99 99 99 99 A9 3F
10           9A 99 99 99 99 99 B9 3F
100           00 00 00 00 00 00 F0 3F

Here a screenshot of the Hex editor with the area with the value (left side) and the right side is when i save with "nothing" measured (there is some fields that are saved on the archive because they are some constants from the option menu).
Like i said, a lot of space.




Maybe an usefull info: when i export with the program itself, the max number is 10+comma (0.123456789) but it look like it's still a 8 Bytes block. Those 3E/3F are something very prominent on that archive.

Does somebody see a pattern or have any ideas how to decrypt this??
If you think you have an idea but you need more values to test it, just request them, i can input them and send you the 8 Byte block back.
Thanks
« Last Edit: September 09, 2016, 02:18:11 am by Auryn »

NoOneee

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Pattern / Decryption
« Reply #1 on: September 08, 2016, 03:23:41 pm »
It's the number in meters stored in 64 bit IEEE-754 float little endian format.
http://babbage.cs.qc.cuny.edu/IEEE-754.old/64bit.html

The site expects a big endian hexadecimal value, so you'll have to invert all the bytes.
Convert this:
3FF0000000000000
And you should get 1 (meter, so 100 in your cm table)

This:
3FA47AE147AE147B
Should get you 0.04 (meters, so 4 in your cm table)


Edit:
Something simple like this:
Code: [Select]
#include<stdio.h>

int main()
{
unsigned char bytes[8]= {0x9A,0x99,0x99,0x99,0x99,0x99,0xA9,0x3F};
double* value_prt=(double*)bytes;
double value=*value_prt;
printf("value = %lf meters",value);

return 0;
}

Will work with any little endian processor that uses the IEEE-754 standard for float/double (e.g. any x86 or x86-64 CPU).
« Last Edit: September 08, 2016, 05:31:35 pm by NoOneee »

Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Pattern / Decryption
« Reply #2 on: September 09, 2016, 01:30:04 am »
I will give it a try, thanks :)

Ps: note to myself: don't ask questions about length  conversions after a long and hard day of work!
I just noticed what bullshit I wrote. Sorry.
The important is that you got the idea :)
« Last Edit: September 09, 2016, 02:12:19 am by Auryn »