1

Closed

Figuring out QRCodes

description

This work item is for figuring out how to get code running that will let us display a QRCode and read a QRCode, ideally at the same time. This doesn't include UX integration into our address book.
Closed Sep 9, 2014 at 7:45 PM by yarong

comments

yarong wrote May 22, 2014 at 11:08 PM

How much data do we need to store in the QR Code?

For our needs we probably need something on the order of 400-500 characters.

Note that assumes a 4096 bit RSA key (plus another 20 characters for the modulus and other random stuff) and assumes base 64 encoding with 1/3 loss due to encoding overhead plus an onion URL (30 characters after encoding) == 4096 bits / 8 bits/character * (2/3 compression cost) + 20 characters + 30 characters = 391 characters. We'll probably also want to give some information about the user like a suggested name. So you end up in the 400-500 character range.

Testing an Android rear facing camera using a 3rd party QR Code app reading a 27 inch computer monitor

I downloaded a generic QR Code app on my Android phone which uses the rear facing camera. So I used that to read text QR Codes off my screen. I tried up to 800 characters without a problem.

Testing my front facing laptop camera reading QR Codes off my phone using a 3rd party windows QR Code reading app

I downloaded an app for Android that generates QR Codes and found an app for Windows that reads QR Codes. Unfortunately the Android app limited text QR Codes to 400 characters but the PC read that without a problem.

Testing my front facing laptop camera reading QR Codes off the phone using the Javascript based library

This was really depressing. I literally created a text code that said "hi". That worked. But when I tried "0123456789" it failed! So the issue isn't the format (both used text format and the first worked). The issue isn't the camera since I used the same camera in the test above and it worked fine. The issue is that the Javascript reader doesn't work very well.

Testing my front facing phone camera using the Javascript QR Code library reading off my 27 inch monitor

I literally couldn't get anything to work. :( This might be a camera issue but given the previous test I wouldn't be sure of it.

yarong wrote May 23, 2014 at 3:47 PM

Apparently that whole math thing is a bit hard for me. Let's try it again: 4096 bit RSA key (plus another 20 characters for the modulus and other random stuff) and assumes base 64 encoding with 1/3 bloat due to encoding overhead plus an onion URL (30 characters after encoding) == 4096 bits / 8 bits/character * (4/3 compression cost) + 20 characters + 30 characters = 732 characters. We'll probably also want to give some information about the user like a suggested name. So you end up in the 800 character range.