Reliability on QR codes and Reed-Solomon codes
Bhavuk Sikka Bajaj
TL;DR
The paper analyzes the security of QR codes by examining Reed-Solomon error correction, framing QR data as byte-oriented blocks protected by RS codes within the BCH-derived family. It presents a rigorous code-theoretic background (including finite-field arithmetic, cyclic codes, BCH and RS constructions) and then applies this to the QR workflow, detailing RS$(255,223)$ as a canonical QR example and showing how data are encoded and interleaved across blocks. The key finding is a practical vulnerability: byte-level error correction can be bypassed by targeted bit-level edits, allowing adversaries to modify data with a small number of pixel changes while preserving decodability, demonstrated through concrete RS$(26,13)$ and RS$(26,19)$ scenarios and precise bit-level analyses. The work discusses implications for QR-based security and proposes improvements such as higher $H$-level error correction, mask-verification, and possibly bit-level error correction, recognizing trade-offs in code size and decoder cost. Overall, the study provides a formal, math-backed view of QR code resilience and a pathway to strengthening integrity against selective edits in real-world deployments.
Abstract
This study addresses the use of Reed-Solomon error correction codes in QR codes to enhance resilience against failures. To fully grasp this approach, a basic cryptographic context is provided, necessary for understanding Reed-Solomon codes. The study begins by defining a code and explores key outcomes for codes with additional properties, such as linearity. The theoretical framework is further developed with specific definitions and examples of Reed-Solomon codes, presented as a particular variant of BCH codes. Additionally, the structure of QR codes is analyzed, encompassing different versions and how data is represented in the form of black and white pixels within an image. Finally, an inherent vulnerability of Reed-Solomon Codes, and particularly of QR codes, related to selective manipulation of modules is examined. This vulnerability leverages the error correction mechanisms present in Reed-Solomon codes.
