Inspired by a recent HN article on QR codes [0], I decided to finally publish [1] and open-source [2] a service I created 7 years ago. I got pulled away from it by projects with higher priority and it has been catching dust and been bitrot eroding since. Now reconstructed the basics and hosted on an AWS instance I would like to share so it might inspire. Creating a photo realistic QR requires two steps. The first is to create a 93x93 dithered monochrome image. The dithering is calculated to preserve the mandatory QR framework/timing bits and keep the data/crc bits conforming. Trying to maximize the crc bits to match the original image. The second step is adding colour information as a 186x186 dithered layer. The colour palette is created using Spacial Colour Quantification which uses the 93x93 QR image as constraints on the available colour range. SCQ also stabilises palettes used for animations (a service not made available through the site yet).
Slightly OT, but when migrating data between iPhones, the old iPhone displays an animated point cloud that appears to function like a QR code. You scan it with the new phone, and your data starts to migrate locally through Bluetooth.
Other than aesthetics, what are the advantages of the point cloud? Higher bandwidth? Also, if you were to transfer 100s of megabytes of data from device A to B, using A's display and B's camera, what tech would you look into?
I could be completely off the mark, but would an animation make it difficult to spoof. I can't now just use a photo of the cloud? Of course it could be that it just looks cool :D
Not quite sure I understand what the question is. Calculating the QR is really CPU intensive and the settings on the site are for lowest quality. ANd even now its overloading.
If I had to guess, the animated point cloud isn't tasked with transferring lots of (megabytes) data, but is probably a proprietary version of a QR code, both for aesthetics and security through obscurity. Its format may also have higher information density than a QR code, which would work well for encrypted data.
I imagine the heavy lifting is done on Apple's server. The data being transferred locally is likely a GUID/IMEI/etc + a nonce.
I just transferred a friend's iphone the other day and noticed this animated pattern. I presumed the QR-like code was just to transfer authentication so that the two phones could establish a secure wifi connection, since the QR recognition is fairly instantaneous and you don't have to keep the camera on the animation for long. (the process does ask you to keep the phones close, so the later transfer is probably by bluetooth, as you say)
One (possible) advantage could be that the animated nature means that someone taking a photograph of the animation won't capture enough data to steal the whole payload? And the use of tiny pixels might mean that even a video capture from anywhere but up-close might not have enough fidelity (after compression) to read the encoding either?
I bet its about the “opportunity cost aesthetics”—-Apple thinks QR codes are butt ugly. See also the round App Clips codes recently introduced, and the very late (I bet teeth-grittingly reluctant) introduction of QR scanning in the first-party iOS Camera app.
Here is a good demo of a streaming qr solution. Not ours but a good demo of the concept.
https://youtu.be/_0djJ1aVEXs We use a similar method for offline wallet transfers of private crypto keys. I’ll note a couple things. Keep the frame simple and not too dense. Be careful on ecc settings. Higher res camera androids to be slower in our testing. Be ready to loop the series to catch missed frames. Gives your frames and order context. If it’s really sensitive dat, encrypt it before encoding you QR. assume the video can be stolen from a camera. Inject noisy frames To help obfuscate.
Did you consider using the front camera for bidirectional phone-to-phone communication? That could allow frame re-transmits which would increase the data rate a lot.
Hey, I wanted to use your library to send data from computer A to computer B, but I don't speak Go yet.
How easy would it be to implement a txqr reader for desktop? Piping zbarcam's output could be the easiest way. Have you got any directions for me to do it? It would be a great addition to txqr! Thanks!
I've been wondering how one could efficiently and reliably pack arbitrary data into YouTube videos, a hacky way to get free and obfuscated data storage. Streaming QR codes has been the most promising way I can think of, particularly since they offer resilience against YouTube's video re-encoding process and are standardized for far larger codes, which could be easily fit in a video for later parsing out by a tool. You could probably embed even greater data densities with a color QR solution too.
> Other than aesthetics, what are the advantages of the point cloud? Higher bandwidth?
Higher information density, in that it can pass ad-hoc wifi network info and cryptographic keys. The animated "QR code" also contains a unique code in each frame that is then sent back during the pairing process. This allows them to measure the round trip time from display to camera to wifi back to the original device, preventing relay and replay attacks. (This is based on my attempting to reverse engineer watch pairing for a few days)
Somehow, I think these kinds of "clever" QR codes would be less used. Most people aren't going to even notice that they are legit QR codes. QR codes are already underutilized enough, at least in western countries. Cool idea, though!
It’s my opinion that underutilization is because of application rather than any more ephemeral thing like appearance. QR codes haven’t had a killer app yet, and they tend to be used for marketing rather than any critical tasks that rely on the qualities that make it a useful technology. My guess is this will change as it’s become more or less a requirement to have a cell phone to function in western society.
/My guess is this will change as it’s become more or less a requirement to have a cell phone to function in western society./
I think that time has already arrived... I remember seeing reports that a cellphone was generally the most-valued item amongst the homeless in the US. (Not quite a quantitative study, but here's an article on the importance of cellphones for homeless people, and challenges they face: https://www.calhealthreport.org/2019/01/11/expired-lost-stol... )
As an European I’d say over half of my mobile payments are already via a QR code (it triggers a direct debit from my bank app). It’s infinitely faster than going through online checkout forms.
I am French, use mobile payments and would be interested to see a payment qrcode (never seen one) Also, when you mention Direct Debit, is this the mechanism which allows a merchant to draw on your bank account? There need to be confirmed with the bank before (though maybe it is possible now to have that in one step, which also has your consentement)
> it's become more or less a requirement to have a cell phone to function in western society
Owning a cell phone doesn't mean everyone keeps it with him at all times, and this will limit potential uses. Hopefully people don't become tied to it that badly.
When I lived in China, scanning QR codes was how we initiated payments for restaurants, groceries, couriers and other offline goods/services. It was also how we added people to WeChat. I would guess at least 20 million QR codes are scanned per day in Beijing.
Since the virus hit, where I live restaurants are prohibited by law from having reusable menus. Instead, nearly all of them have a QR code at the able that you scan to see the menu on your phone. That could do it.
The big problem is that any random QR code could be malware or the like (not a big problem for the tech-savvy, but worrying for those who are not) and few urls are so unwieldy that QR codes work better.
I can see it being useful for stealth links to .onion sites which are generally impossible to remember and a pain to type out.
Look at just any thing you’ve purchased and you’ll find a QR code on it somewhere (or the box it came in). They have massive uptake in warehousing and manufacturing.
They are also very popular in China, the dang things are on just about every surface.
Comments (106) 24 threads
Inspired by a recent HN article on QR codes [0], I decided to finally publish [1] and open-source [2] a service I created 7 years ago. I got pulled away from it by projects with higher priority and it has been catching dust and been bitrot eroding since. Now reconstructed the basics and hosted on an AWS instance I would like to share so it might inspire.
Creating a photo realistic QR requires two steps. The first is to create a 93x93 dithered monochrome image. The dithering is calculated to preserve the mandatory QR framework/timing bits and keep the data/crc bits conforming. Trying to maximize the crc bits to match the original image.
The second step is adding colour information as a 186x186 dithered layer. The colour palette is created using Spacial Colour Quantification which uses the 93x93 QR image as constraints on the available colour range.
SCQ also stabilises palettes used for animations (a service not made available through the site yet).
This is very cool tech but from a UX pov I think it's better codes small and pure (no logo or non-square dots)
Other than aesthetics, what are the advantages of the point cloud? Higher bandwidth?
Also, if you were to transfer 100s of megabytes of data from device A to B, using A's display and B's camera, what tech would you look into?
https://apple.stackexchange.com/questions/301563/what-is-the...
https://www.quora.com/Has-somebody-tried-to-dynamically-gene...
I imagine the heavy lifting is done on Apple's server. The data being transferred locally is likely a GUID/IMEI/etc + a nonce.
Continue this thread — 1 reply
One (possible) advantage could be that the animated nature means that someone taking a photograph of the animation won't capture enough data to steal the whole payload? And the use of tiny pixels might mean that even a video capture from anywhere but up-close might not have enough fidelity (after compression) to read the encoding either?
https://youtu.be/_0djJ1aVEXs
We use a similar method for offline wallet transfers of private crypto keys. I’ll note a couple things. Keep the frame simple and not too dense. Be careful on ecc settings. Higher res camera androids to be slower in our testing. Be ready to loop the series to catch missed frames. Gives your frames and order context. If it’s really sensitive dat, encrypt it before encoding you QR. assume the video can be stolen from a camera. Inject noisy frames To help obfuscate.
Continue this thread — 1 reply
How easy would it be to implement a txqr reader for desktop? Piping zbarcam's output could be the easiest way.
Have you got any directions for me to do it? It would be a great addition to txqr!
Thanks!
Continue this thread — 2 replies
Higher information density, in that it can pass ad-hoc wifi network info and cryptographic keys. The animated "QR code" also contains a unique code in each frame that is then sent back during the pairing process. This allows them to measure the round trip time from display to camera to wifi back to the original device, preventing relay and replay attacks.
(This is based on my attempting to reverse engineer watch pairing for a few days)
I think that time has already arrived... I remember seeing reports that a cellphone was generally the most-valued item amongst the homeless in the US.
(Not quite a quantitative study, but here's an article on the importance of cellphones for homeless people, and challenges they face: https://www.calhealthreport.org/2019/01/11/expired-lost-stol... )
Continue this thread — 3 replies
I am French, use mobile payments and would be interested to see a payment qrcode (never seen one)
Also, when you mention Direct Debit, is this the mechanism which allows a merchant to draw on your bank account? There need to be confirmed with the bank before (though maybe it is possible now to have that in one step, which also has your consentement)
Owning a cell phone doesn't mean everyone keeps it with him at all times, and this will limit potential uses. Hopefully people don't become tied to it that badly.
When I lived in China, scanning QR codes was how we initiated payments for restaurants, groceries, couriers and other offline goods/services. It was also how we added people to WeChat.
I would guess at least 20 million QR codes are scanned per day in Beijing.
It's a thing we can't deny.
Like the fact that I will love you 'til I die.
For a shop to adopt QR payments, all they need a printout of a QR code. No hardware, not leasing some card reader, zero maintenance.
Continue this thread — 2 replies
Since the virus hit, where I live restaurants are prohibited by law from having reusable menus. Instead, nearly all of them have a QR code at the able that you scan to see the menu on your phone.
That could do it.
I can see it being useful for stealth links to .onion sites which are generally impossible to remember and a pain to type out.
They are also very popular in China, the dang things are on just about every surface.
Continue this thread — 1 more reply
Continue this thread — 11 replies
All comments shown.
Couldn't load more comments. Check your connection and try again.