QR code resolution
The Cool Maze QR code is a dynamically generated grid of 25x25 “modules”.
It contains a secret key that needs to be sufficiently long to guarantee privacy, but we also want the encoded data to be as short as possible, to improve the scanning experience. Let’s examine the different possible QR code configurations.
- We encode the QR code data in Byte mode.
- There are four possible error correction levels: L, M, Q, H.
- The grid module resolution depends on the number of characters we’re encoding. The minimum dimensions are 21x21 for “Version 1”.
For each possible resolution and each error correction level, we find the maximum number of characters we can encode (hover for the details):
Error correction level | ||||||
---|---|---|---|---|---|---|
L | M | Q | H | |||
(low) | (medium) | (quartile) | (high) | |||
Dimensions | Version 1 | 21x21 | 17 | 14 | ✖ | ✖ |
Version 2 | 25x25 | 32 | 26 | 20 | 14 | |
Version 3 | 29x29 | 53 | 42 | 32 | 24 | |
Version 4 | 33x33 | 78 | 62 | 46 | 34 |
cmaz.io/#a/Ck5E6Y
, including a secret key of length 6 having 6*6 = 36 bits of entropy. It fits in a grid of 21x21 modules, with the error correction level L. 
cmaz.io/#a/1FY
, including a secret key of length 3 having 3*6 = 18 bits of entropy. It fits in a grid of 21x21 modules, with the error correction level M. 
cmaz.io/#a/0gSAQU782WmGkzo9z1-zk
, including a secret key of length 21 having 21*6 = 126 bits of entropy. It fits in a grid of 25x25 modules, with the error correction level L.
cmaz.io/#a/qqLhdWY6Ui-rV4j
, including a secret key of length 15 having 15*6 = 90 bits of entropy. It fits in a grid of 25x25 modules, with the error correction level M.
cmaz.io/#a/1guowGZar
, including a secret key of length 9 having 9*6 = 54 bits of entropy. It fits in a grid of 25x25 modules, with the error correction level Q. 
cmaz.io/#a/0sn
, including a secret key of length 3 having 3*6 = 18 bits of entropy. It fits in a grid of 25x25 modules, with the error correction level H. 
cmaz.io/#a/mqtiqwrfl71FLPjgbBnlf9FPSGPX.ClNUzy9PM9x4L
, including a secret key of length 42 having 42*6 = 252 bits of entropy. It fits in a grid of 29x29 modules, with the error correction level L. 
cmaz.io/#a/suI4gDVCLZq3Nqqq.gyOG7lPc3BL1ae
, including a secret key of length 31 having 31*6 = 186 bits of entropy. It fits in a grid of 29x29 modules, with the error correction level M. 
cmaz.io/#a/p8DA-7tSjlpxFRWcEqidQ
, including a secret key of length 21 having 21*6 = 126 bits of entropy. It fits in a grid of 29x29 modules, with the error correction level Q. 
cmaz.io/#a/y.kDtd6mtJYHh
, including a secret key of length 13 having 13*6 = 78 bits of entropy. It fits in a grid of 29x29 modules, with the error correction level H. 
cmaz.io/#a/qH4I6WTZHcxQvEHoud6.nH9BBNOIDo33Ayd-5wzHtQrBDhtJ-FupxbMuGxeAuFJcbHl
, including a secret key of length 67 having 67*6 = 402 bits of entropy. It fits in a grid of 33x33 modules, with the error correction level L. 
cmaz.io/#a/sUlpZO1CglZMeFqdoGhhQgbLnX9zB8hwcdnmJh6tbVBzKZDoR.3
, including a secret key of length 51 having 51*6 = 306 bits of entropy. It fits in a grid of 33x33 modules, with the error correction level M. 
cmaz.io/#a/SM1kVy7b1VwK1obRjip7llF1n8sK3442799
, including a secret key of length 35 having 35*6 = 210 bits of entropy. It fits in a grid of 33x33 modules, with the error correction level Q. 
cmaz.io/#a/spgwo6XTZZKNKcrx1L8onVH
, including a secret key of length 23 having 23*6 = 138 bits of entropy. It fits in a grid of 33x33 modules, with the error correction level H. 
cmaz.io/#a/
plus a secret key, in a grid of 21x21 modules. cmaz.io/#a/
plus a secret key, in a grid of 21x21 modules.Our sweet spot is the 25x25 grid with the low level of error correction (L). The QR code displayed is never “damaged”, except for the small red icon in the center, which covers 4% of the grid area. The level L offers a correction rate of 7%, which is sufficient in this case. We encode a string of 32 characters, including 21 characters for the secret key. The secret key alphabet has 64 letters, which amounts to an entropy of 6 bits per character. Our secret key has a total entropy of 126 bits and fits nicely in a convenient 25x25 “Version 2” QR code.