{"id":79,"date":"2006-01-29T22:05:42","date_gmt":"2006-01-29T22:05:42","guid":{"rendered":"http:\/\/www.reactivated.net\/weblog\/?p=79"},"modified":"2006-08-30T03:24:07","modified_gmt":"2006-08-30T03:24:07","slug":"fingerprinting","status":"publish","type":"post","link":"http:\/\/www.reactivated.net\/weblog\/archives\/2006\/01\/fingerprinting\/","title":{"rendered":"Fingerprinting"},"content":{"rendered":"<p>Over the last couple of days, I found the time to finish off the <a href=\"http:\/\/dpfp.berlios.de\">dpfp<\/a> kernel-side driver so that it exports fingerprint data into userspace, to make it easier to investigate the image format.<\/p>\n<p>I had it working relatively easily. Running a small program on \/dev\/dpfp0 produces 7 data files, one of which is the fingerprint data, the others are interrupt data and other blocks of data that are probably interesting but we don&#8217;t know the purpose of.<\/p>\n<p>I was going to leave it at that (others seem to be very interested in the image format), but I thought I might as well have a quick look at the fingerprint data and see if I can find anything interesting. I had glanced at some data previously, but had not done anything with my findings &#8211; it&#8217;s awkward to work with until you reach the stage where you can obtain data with just a single command.<\/p>\n<p>I noticed the strange structure that I saw before: the data appears to be separated into chunks, each chunk being separated by 26 zero bytes. Each chunk is about 358 bytes long, so I decided that one chunk may be equivalent to one row of pixels in an image.<\/p>\n<p>I noticed that the final part of the transfer ends right in the middle of the zeroes. I also noticed that the number of zeroes between chunks varies a little here and there.<\/p>\n<p>Unusual, but not totally out of the question. Maybe each chunk starts and ends with zeroes, which would mean each chunk starts halfway through these series of zeroes I was seeing. That would explain why the transfer ends halfway through a block of zeroes.<\/p>\n<p>Picturing that in an image scenario (where 0 = black), I realised that this would result in two black columns down the left and right side of the image. I then recalled an image that Jose M Robles sent me recently: a raw image from a fingerprint scanner (not really sure which one) which had black columns down either side. Jose has been doing a fantastic job throwing around theories about the image format, sending me histograms, pixel averages, sample images like that one, etc. Jose&#8217;s experiments also seemed to indicate that the encryption was weak, and at this point, things were starting to fall together.<\/p>\n<p>After a few more calculations I decided that the image data starts after a 64-byte header. I also deduced the width (358 + 26 zeroes = 384 pixels) and height (exactly 259 &#8216;rows&#8217; of pixels are included in the transfer). I cut out the header and replaced it with a <a href=\"http:\/\/netpbm.sourceforge.net\/doc\/pgm.html\">PGM<\/a> header. <\/p>\n<p>I was both happy and amazed to see the result:<\/p>\n<p><img src='http:\/\/www.reactivated.net\/weblog-content\/20060129toe.jpg' alt='' \/><\/p>\n<p>No encryption whatsoever, despite <a href=\"http:\/\/www.digitalpersona.com\/resources\/downloads\/4000BModule10-05.pdf\">DigitalPersona&#8217;s claims<\/a> (PDF).<br \/>\n<strong>Update:<\/strong> Those claims may be true. The UareU 4000 isn&#8217;t advertised to be included in the MS devices, we just put 2 and 2 together and saw all the simlarities. Now that I have looked closer at the UareU 4000 behaviour, it looks like encryption may be in place on those devices (but not the MS ones).<br \/>\n<strong>Another update:<\/strong> I discovered that <a href=\"http:\/\/www.reactivated.net\/weblog\/archives\/2006\/01\/breaking-encryption-the-easy-way\/\">the devices do support encryption<\/a> but the Microsoft devices ship with encryption turned off.<\/p>\n<p>This isn&#8217;t a real fingerprint scan &#8211; I actually scanned one of my toes, to protect the identity of my innocent fingers. Proper scans look more fingerprint-like.<\/p>\n<p>3 imagemagick commands later (invert colours, increase brightness, decrease gamma) and it is perfect for processing:<\/p>\n<p><img src='http:\/\/www.reactivated.net\/weblog-content\/20060129toeproc.jpg' alt='' \/><\/p>\n<p>Fancy stuff. It is lucky that those solid black columns are there, otherwise this wouldn&#8217;t have been anything like as obvious. I&#8217;ll be rewriting the driver soon, to be more simplistic and to export PGM images straight from the \/dev node.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the last couple of days, I found the time to finish off the dpfp kernel-side driver so that it exports fingerprint data into userspace, to make it easier to investigate the image format. I had it working relatively easily. Running a small program on \/dev\/dpfp0 produces 7 data files, one of which is the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,1],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-fingerprinting","category-gentoo"],"_links":{"self":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":0,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.reactivated.net\/weblog\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}