Diabetes Forums » General » Diabuddies » Decoding Dexcom STS data


Welcome to Diabetes Forums!

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.


Reply
Decoding Dexcom STS data LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2007, 01:42 AM
Junior Member
I am a: Type 1
 
Join Date: Oct 2006
Posts: 38
Question Decoding Dexcom STS data

It looks like the OneTouch UltraSmart data format has almost been decoded thanks to a lot of work from several people.

Maybe it's time for a new challenge.

I've been using a Dexcom STS continuous glucose monitor for about a month now. As soon as I received the software, I was disappointed with the lack of summary information that it gave me.

So I've posted information on my blog about what I've figured out so far about the data format. If anyone help can help me some in figuring out how to decode the data that would be great.

Have a look at my reader's challenge post for more details.
__________________

Type 1. Dx'ed September 1972
Cozmo 1800 and Dexcom Seven STS
Life with diabetes in pictures - the diabetes365 project
Reply With Quote
  #2 (permalink)  
Old 04-29-2007, 02:29 AM
JasonJayhawk's Avatar
Senior Member
 
Join Date: Jul 2004
Location: MIdwest, USA
Posts: 1,067
I saw your blog, did a Google search, and found that you'd posted here.

Anyhow, I agree with the other person's assessment -- it's not an SHA-1 (secure hash), since a hash can only go in one direction.

That said, a few things that make even more questions:

<DatabaseRecords Size="65536" CompressedSize="7028"...>

That size does not seem by chance, since it is 2^16 (16 bits) in length. When taking the ASCII text data of that XML node, I get a file that is 9,373 bytes long. I would have hoped it equaled 7028 bytes...

It's even less promising with the mention of the "RSAKeyValue" and exponent. I am taking a guess that they are performing RSA encryption on the data before doing anything else, since the record size should be 7,028 (I think the extra bytes that make it go up to 9,373 bytes are due to the added encryption padding; base64 decoding results in a string that may be readable by decoding with RSA -- or perhaps, I'm completely wrong, and they've got an efficient way of using those bits to record the numeric data in regular time intervals).

The only way to reverse that is to know their private key. And I'm sure that private key is somewhere not very obvious (or maybe it is...argh!). While the program is bad, they seemed to really be good at hiding stuff. Or maybe we're just looking too hard!

I find it also interesting that they have a "Signature value" -- I wonder why they would sign that data.

It would be interesting if you modified a single byte of that Signature to see if the program crashes. Or modify the modulus of the RSA key to see if it hurls. If it does, we know that decryption must be performed first. If it doesn't, we'll know that we can ignore that info.

So if you can be so kind as run those experiments, maybe we could get a bit further.

The next problem is that if it does turn up to be a string that has been encrypted with RSA, then if we were to find the private key and break it (which might take the effort of a cluster of key-breaking computers), we won't even know what we're looking for.

The decryption key could even be different for each device, depending on the serial number stored in the flash.

They're really covering their assets, if this is the case. Why, though? It's a frustrating mystery.

My thoughts are perhaps they think they need to encrypt it for patient privacy. Or maybe they want a piece of the money if someone takes their invention and does something with it?

One other trick might be to play with modifying some of the other data in the XML file to see how the program reacts. If you change a bit of that 9K data string, does the program fail upon discovering the error?

Someone probably got their hands on a toolkit that let them do this kind of encoding, and they got excited and really made it worse to figure out for those who need that info.
Reply With Quote
  #3 (permalink)  
Old 04-29-2007, 02:32 AM
JasonJayhawk's Avatar
Senior Member
 
Join Date: Jul 2004
Location: MIdwest, USA
Posts: 1,067
Did a Google search and found someone else working on the same problem:

HELP with decompressing data., in Lang Xml
Reply With Quote
  #4 (permalink)  
Old 04-30-2007, 06:22 AM
Junior Member
I am a: Type 1
 
Join Date: Oct 2006
Posts: 38
Thanks Jason

I'm chatting with a John Brown by e-mail and he has managed to accomplish some decoding.

I've sent him another data file plus the actual values for the start of that file (laboriously entered by hand from their software).

The data includes 4 types of records apparently:
Start mm/dd/yy hh:mm:ss
Gap hh:mm:ss
Sensor readings, value, mm/dd/yy hh:mm
Meter readings, value, mm/dd/yy hh:mm

So the first records in my system are:
Gap 00:10:00
Gap 00:10:00
Start 3/23/2007 11:20:24 AM
Meter 142, 3/23/2007 11:20 AM
Gap 00:10:00
Meter 143, 3/23/2007 11:44 AM
Meter 140, 3/23/2007 11:44 AM
Sensor 147, 3/23/2007 11:53 AM
Sensor 141, 3/23/2007 11:58 AM
Sensor 142, 3/23/2007 12:03 AM

If anyone reading wants them, I can post these two files at my site.
__________________

Type 1. Dx'ed September 1972
Cozmo 1800 and Dexcom Seven STS
Life with diabetes in pictures - the diabetes365 project
Reply With Quote
  #5 (permalink)  
Old 05-01-2007, 02:57 AM
JasonJayhawk's Avatar
Senior Member
 
Join Date: Jul 2004
Location: MIdwest, USA
Posts: 1,067
Thanks for working on it. Was there any sort of decryption required?

(I'm just an observer. With newborn twins in hand, there won't be any time to inject anything other than peanut-gallery comments).
Reply With Quote
  #6 (permalink)  
Old 06-09-2007, 05:41 AM
Junior Member
I am a: Type 1
 
Join Date: Oct 2006
Posts: 38
Still no success

But I've been distracted with other things.

I put a note on my blog with pointers to sample data files.

And I'm hoping (probably foolishly) that the new Dexcom meter plus software will be better.

If anyone else could help, that would be great. Anyone out there with .NET development experience?
__________________

Type 1. Dx'ed September 1972
Cozmo 1800 and Dexcom Seven STS
Life with diabetes in pictures - the diabetes365 project
Reply With Quote
  #7 (permalink)  
Old 08-07-2007, 01:11 PM
Junior Member
I am a: Type 1
 
Join Date: Oct 2006
Posts: 38
The new Dexcom software resolves the data issue

This is just a quick update.

The new Dexcom software (DM 2) will work with both the Dexcom 3 STS and Dexcom 7 STS systems.

It provides a good export facility that lets you create an XML file or a Tab delimited file that Excel can understand.

So I'm dropping my quest to decode the data. Life's too short.

My advice - get hold of the new DM2 software if you can.
__________________

Type 1. Dx'ed September 1972
Cozmo 1800 and Dexcom Seven STS
Life with diabetes in pictures - the diabetes365 project
Reply With Quote
  #8 (permalink)  
Old 08-07-2007, 07:20 PM
Banned
I am a: Type 1
 
Join Date: Dec 2006
Location: Missouri
Posts: 301
Bummer, and I love these kinds of riddles.
Reply With Quote

Reply


Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Log in
User Name:

Password:

Not a member yet?
Register Now!

All times are GMT -7. The time now is 02:59 PM.

For Advertising:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32