Do you really understand QR codes? here are the details

There are some features that we use almost every day but we don’t know anything about the functionality. One of these features is QR codes. We use it almost every day when we travel, eat, shop, etc. A few years ago, no one would believe that a little black and white code would have so many uses. Who would have thought that this seemingly banal black and white square subtly changed our lives? Users can scan QR codes to perform a range of functions. You can use this code to add friends to your social circle. Users can also use it to make a payment or even use it to join a party. These are just the most common application scenarios of QR codes. However, what do you know about this code? Why does the code have small squares? Let’s take a look at some details of QR codes.

Composition and principle of QR codes

QR means quick response. These codes first appeared in 1994. However, it took another 7 years (2001) before they were popularized in China. These codes are transformed from barcodes. This is most common on commodity packaging. It consists of black and white vertical stripes of different thicknesses. Merchandise information is hidden in this barcode.

QR codes

A barcode carries information in one dimension. However, when it is a two-dimensional code (horizontal and vertical dimensions), it changes from a bar to a square shape. Whether it is a barcode or a QR code, it is essentially an information portal. A complete QR code is made up of several small black squares and small white squares. First, characters such as numbers, letters, and symbols are converted to binary “0” and “1” through certain operations and encoding rules. Then the code is completed using a series of optimization algorithms. The small white squares represent binary “0” and the small black squares represent “1”.

When reading the two-dimensional code, the sequence 01 on the two-dimensional code is read through the color contrast. Then the binary is converted into characters that we can recognize by numbers. The arrangement of binary coding is the embodiment of information. Its basic functional areas are divided into

1. Position detection graph

There is a large black and white square at the three corners of the QR code – the position detection graph. This, together with the position detection graphic separator and the positioning graphic, helps the two-dimensional code to be positioned during the forming process to reduce the occurrence of a mismatch. Whether your phone scans horizontally, vertically or diagonally, it recognizes the code. For each QR code, their position is fixed, but the size specification varies.

QR codes

2. Format Information

This indicates the error correction level of the code. The higher the level, the stronger the error correction ability. For example, if there are 100 codeword data to be coded, and half of them, i.e. 50 codewords, are to be error-corrected, the calculation method is the next one. Error correction requires twice as many symbols as codewords (RS* encoding), so in this case the number is 50 × 2 = 100 codewords. Therefore, the total number of codewords is 200, of which 50 codewords are used for error correction. Thus, the error correction rate relating to all the code words is 25%.

Quick response

Gizchina News of the week

This report is equivalent to the “Q” level of the QR code error correction level.

  • Level L: Up to 7% of characters can be corrected
  • Level M: Up to 15% of characters can be corrected
  • Q level: up to 25% of characters can be corrected
  • Level H: up to 30% of characters can be corrected

3. Correction charts

When the image is bad to some extent, the decoding software can use it to synchronize the coordinate mapping of the image module. The number and position of QR code correction graphics of different specifications are different. Once the specification is determined, its quantity and location are also determined.

QR codes

4. Data and Error Correction Code Words

The code also stores information and error-correcting code words. This is a fault-tolerant mechanism for QR codes. For example, if less than 30% of the code disappears, the code remains accurate. The scanner can still accurately get information from the incomplete code.

Quick response

5. Release Information

The code symbol has a matrix of 40 specifications, ranging from 21 x 21 (version 1) to 177 x 177 (version 40). Each version has 4 more modules in the vertical and horizontal directions than the previous version. The maximum number of characters entered and the amount of data, character type and error correction level are equal for each code. If the data increases, it will require more symbols and the code will be larger. When the code scan starts, it immediately recognizes the areas containing the information. It follows the detection pattern, the position detection pattern separator and the positioning pattern.

QR codes

Will the code run out?

Today, almost every country on the planet uses QR codes on a daily basis. The number of daily uses exceeds 10 billion. Will the design language of these codes ever end? Well, it depends on how many codes humans can create. There are many types of QR codes (QR code is just one of them). We also have code 49, code 16K, etc. All of these types of codes can contain a lot of information. Even for the same code, there are different versions that all contain a lot of information. This is because the codes come with different coding patterns.

Moreover, the same code can be reused. It also increases the timeline of these codes. The smallest QR code we currently use is 21×21 in size. It has 21 dots which can contain either 1 or 0. So by permutation and combination method it is 2 to the power of 441. If we expand this , the number of derivable codes is 5.678×10^132. This is already an astronomical figure. A single version of a QR code with an encoding method can store so much information. Even though humans use up to 10 billion codes per day, we don’t have to worry about running out of codes.

Are these codes completely safe?

While “Living on Code” brings us convenience, security concerns also follow. QR code generators are easy to get on the internet and have no restrictions on their distribution. Thus, it is quite easy for criminals to manipulate the codes. Here are some common pitfalls of QR codes, you should be more careful

  • Scam – the codes could be fake to steal your information
  • Fishing QR code
  • Get Free Prizes Scam

How to harden the code

To ensure the security of QR codes, efforts should be made on the following four aspects:

  • When companies provide QR codes externally, they must ensure QR code security.
  • When we scan the QR code, firstly we use the terminal with the security identification function
  • Do not scan codes from unknown sources
  • National legislation to protect code payments

Comments are closed.