Live data from Hacker News

The Photographic Science of Detecting Fake Lottery Tickets

hackerfactor.com

31–40 of 54 posts

Re: The Photographic Science of Detecting Fake Lottery Tickets

#31

Slightly related, I was wondering how the actual lottery tells if your ticket is real - do the machines record your ticket's serial number and number(s) chosen and then send the info to the lottery HQ? Or do the lottery machines compute an HMAC of some kind and encode it in the serial number on the ticket itself?

In California at least one ticket was verified by closed circuit video of the person buying it.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#32
post #27

There is nothing scientific about any of these tests. What's a 'high' ELA or 'low'? The thing that triggers a 'positive' seems to be only the authors intuition. While some of the tests might show something, I'm pretty sure ELA is absolute garbage - you can't separate the number of needed resaves because of the content frequencies from number of times it has already been resaved.

He used PCA as well as ELA, making your first statement unfounded.

While the result of the PCA is quite well defined, there is nothing well defined about the inferences he draws from that. In the end it shows a marked difference in the suspicious area, but there is no proof that the technique will only show those results on tampered areas.

If you can simply run filters until the suspicious area 'looks a bit different' and thats your success criteria, you haven't proven anything.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#33

Earlier quoted context omitted.

You don't need to get technical about it, but I think most people would expect any test described as scientific to be objective.

Do you mean free of bias or reproducible? I think the author was clearly free from bias, and his results are easily reproduced by applying the same algorithms. The subjectivity which you complain about may be the conclusions drawn from the results of the tests, which I think are distinct. Specifically, you cite his "intuition" as the origin of the conclusion. I think the author's intuition is reliable because, like "…

I could, but shouldn't we demand he show some proof for his claims?

It seems to me that if you pull a bit of maths and technical magic out the normal skepticism the tech community melts away into a compliant bundle of gullibility.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#34
post #16

Earlier quoted context omitted.

I don't know about this US lottery specifically but in most systems everything is recorded at HQ. Not just the numbers, but the place, the date and time, serial number etc That way they can also check with CCTV. It's an interesting topic in database design because the link to the store may fail at any time (remember lotteries started years ago on dialup) and you must not have an issued-unrecorded ticket at any point…

Then why did it take so long for them to announce how many winners there were? First they said "at least one", and then they said "three". If everything was stored in a central database, they could have found out the exact figures (and a lot more) as soon as the last winning number was announced. Maybe it's due to lack of coordination between states? Or maybe they need to do fraud checking, etc. by watching CCTV foot…

It's because of coordination between states. From the MegaMillions website:

> Unlike some multi-state or multi-country lotteries that have central offices, all Mega Millions duties are shared by member states as part of their membership in the game.

Each state handles their own tickets and they don't all use the same software systems to manage them.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#35

There is nothing scientific about any of these tests. What's a 'high' ELA or 'low'? The thing that triggers a 'positive' seems to be only the authors intuition. While some of the tests might show something, I'm pretty sure ELA is absolute garbage - you can't separate the number of needed resaves because of the content frequencies from number of times it has already been resaved.

What, may I ask, makes a test scientific?

For one, there should be a control. In this case, analyzing another ticket that has not been faked, but preferable he would not know if the control was real or not.

http://en.wikipedia.org/wiki/Blind_experiment#Double-blind_t...

Re: The Photographic Science of Detecting Fake Lottery Tickets

#36
post #10

Is it possible to reverse engineer the image such that it passes all tests? Knowing the various algorithms that could be used, what would be involved in constructing the modification such that it doesn't reveal evidence of any modifications? One thought would be to actually render an entire scene in something like POV-Ray. Imagine if something like this rendering http://www.povray.org/community/hof/chado.php containe…

I imagine it would be hard for renderer to fake all subtle qualities digital camera introduces. Things like "colors too clean", "noise too uniform", "geometric distortion doesn't match any existing lens" would turn up.

In this specific case I think I'd print a fake ticket with dot matrix printer and take photos of it.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#37
This site has a GIMP script for doing Error Level Analysis: http://sites.google.com/site/elsamuko/forensics/ela (After saving it to your ~/.gimp-2.6/scripts folder, the tool hides in the Image menu.)

I just tried it on a couple of my own images, the results are very interesting.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#38

There is nothing scientific about any of these tests. What's a 'high' ELA or 'low'? The thing that triggers a 'positive' seems to be only the authors intuition. While some of the tests might show something, I'm pretty sure ELA is absolute garbage - you can't separate the number of needed resaves because of the content frequencies from number of times it has already been resaved.

One basically looks for roundings caused by quantization and places in the image where the compression (again quantization) is either inconsistent or non-optimal.

A nice tutorial (and a lot of articles) can be found on the Dartmouth site of Hany Farid.

http://www.cs.dartmouth.edu/farid/downloads/tutorials/digita...

Personally, I have had very very mixed results with this method, and never managed to model it correctly. Interpreting results always was a very human job.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#39
post #38

There is nothing scientific about any of these tests. What's a 'high' ELA or 'low'? The thing that triggers a 'positive' seems to be only the authors intuition. While some of the tests might show something, I'm pretty sure ELA is absolute garbage - you can't separate the number of needed resaves because of the content frequencies from number of times it has already been resaved.

One basically looks for roundings caused by quantization and places in the image where the compression (again quantization) is either inconsistent or non-optimal. A nice tutorial (and a lot of articles) can be found on the Dartmouth site of Hany Farid. http://www.cs.dartmouth.edu/farid/downloads/tutorials/digita... Personally, I have had very very mixed results with this method, and never managed to model it correctl…

I understand the theory and I certainly agree resaving jpegs will reduce the error level. If you have an undoctored image to compare it to, you could probably use that to determine which parts have been changed. But given only an image that may or may not have been doctored the error level will vary so much with the image content that it won't be meaningful.

Re: The Photographic Science of Detecting Fake Lottery Tickets

#40
post #27

Earlier quoted context omitted.

He used PCA as well as ELA, making your first statement unfounded.

While the result of the PCA is quite well defined, there is nothing well defined about the inferences he draws from that. In the end it shows a marked difference in the suspicious area, but there is no proof that the technique will only show those results on tampered areas. If you can simply run filters until the suspicious area 'looks a bit different' and thats your success criteria, you haven't proven anything.

Neal specializes in this sort of thing. This blog post wasn't written to convince you that PCA (or ELA) work. If you've read his other posts on forensics, you'd see that he always starts with the common tests, then works through the most likely explanations, trying to see what you can rule out and where you should focus. A lot of the time, you can rule things out with common sense (the out-of-order numbers jumped out at me), though he always goes on to ferret out what manipulation was performed, because that's what the whole blog is about.

Anyhow, people have done lots of tests with lots of different tools to see what they report in different circumstances. So this isn't the first time that someone has used ELA or something. You will notice if you read past explanations that he always tries to find the exact manipulations done, rather than just running a tool and declaring something to have been Photoshopped.

I'm no expert, but I've read his blog for long enough to know that he knows an awful lot about the various quirks of many different image editing programs (Photoshop being by far the quirkiest). But if you still have questions, you can always email him. He was kind enough to reply with a lot of useful information when I asked him something a long time ago. Actually, I think he even blogged about it.

Post reply on HN