QR codes to fight counterfeit chips. - Page 1
Forum section: electronics / general

author: JonnyBoats
author_rank: Regular Contributor
timestamp: March 05, 2015, 03:45:31 am
content: http://spectrum.ieee.org/tech-talk/telecom/security/an-unhackable-qr-code-to-fight-bogus-chips

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 05, 2015, 04:21:40 am
content: Looks like bad reporting, on an even worse article!So, as best I can tell... they're making holographic QR codes? So freaking what? If there's nothing active, unique and trusted inside the thing, how does that make it any harder to copy besides making the encoding medium itself difficult to render?And we all know how well that works out -- holograms have been around since the 60s, and Chinese CE hologram stickers are dime a dozen (heck... dime a gross??) on eBay.Also, speaking of 2N2222s being terrible (from another thread..), the military still uses crap like that because they have no choice; ancient hardware clogged behind millions of dollars, and miles, worth of red tape. And you can't very well alter much in the spec of a 2N2222, because it's in the JEDEC standard! Have fun updating and re-qualifying that...Tim

author: codeboy2k
author_rank: Super Contributor
timestamp: March 05, 2015, 05:30:27 am
content: The article is pretty bad, and the actual research publication is also not very well written.However, it appears to be as follows:The publication talks about using a datasheet image, but the idea is to put the information directly into the QR code, not just via a hyperlink. Normally, QR codes do not have enough storage capacity to store a full image, so the standard approach is to just encode a hyperlink. The researchers here want to encode an image of data, so they use a "double random phase encryption with photon counting" technique to encrypt the image. This basically uses two uniformly random noise generators and the image data, along with a phase mask as a key, to encrypt the image into what looks like noise. EDIT1: they then photon limit the resulting image data, which makes it sparse without losing information. This photon limiting step adds runs of 0-bits in the data, and thus becomes compressible data. Finally, they use a huffman compression to compress the runs of 0 and 1-bits into integers data from 1-256. They do it at least once more, this time on the integer data, which will be runs of integers between 1-256, of 1-3 characters each. They continue to compress it repeatedly until the size does not decrease further. Now this encypted and compressed data can be stored in the QR code. That's the encryption/compression part, and remember that the phase mask used to encrypt the source is the key, and that is a secret (and the key is kept with the manufacturer).Ok, as you said, re: holograms, it doesn't protect against copying the QR code verbatim.. i.e. a replay attack.To guard against that, they propose using another random phase mask (again known only to the manufacturer) to optically encode the QR code before putting it on the chip. This encodes small optical phase variations at the edges of the QR code features. There is still enough contrast in the dots that the QR code scans OK. However, when the QR code is copied by normal means, the phase information is lost.To authenticate a chip, a laser beam is bounced off the QR code. The phase information caused by the original random phase mask used to encode the QR code will be detectable as intensity patterns on a screen. QR codes copied without the phase information or made new with the wrong phase mask will have different intensity patterns and will be detectable as counterfeits.1. edited based on my further research due to matseng's question below.

author: amyk
author_rank: Super Contributor
timestamp: March 05, 2015, 02:47:52 pm
content: Quote from: codeboy2k on March 05, 2015, 05:30:27 am"normal" is going to change rather quickly once they figure that out...

author: matseng
author_rank: Frequent Contributor
timestamp: March 05, 2015, 03:21:49 pm
content: Quote from: codeboy2k on March 05, 2015, 05:30:27 amI haven't read the article yet, and I'm not an expert on compression, but isn't it usually more or less impossible to compress pure random noise data. Even if it's just "very randomish" the compressed data often end up being larger than the original data.Maybe the encryption part of of the process de-randomizes the noise enough to make it compressible....

author: codeboy2k
author_rank: Super Contributor
timestamp: March 05, 2015, 04:11:33 pm
content: Quote from: matseng on March 05, 2015, 03:21:49 pmThat's what I was thinking too, so maybe there's something I've missed. The published paper was really poorly written, lacking in the necessary details and glossing over some parts of the process without a good explanation or mathematical rigor. They even show a picture of noise (like TV snow) and I was thinking, how can they huffman code that ?aha.. I just re-read that part.. after they encrypt it with the 2 random functions and the data + key, they then photon limit the image (I guess this is an optical phase, whereas the previous was a purely mathematical phase).. .. so they photon limit the image data (which makes it sparse! ) and then it can be huffman compressed , since it now has holes as runs of 0-bits, and also runs of 1-bits, that can be strung together to make up huffman codes. They then do it again on that output, since the output of the first huffman step will now be runs of integers between 1-256, which they say can be compressed further. They continue to do this until there is no more decrease in size.(I edited the previous post)