Skip to content

Reed-Solomon Differential Modulation

When the private ciphertext exceeds the remaining padding capacity of the QR data segment, PlyQR activates RS Parity Differential Modulation.


In standard ISO/IEC 18004 QR codes, a symbol is divided into $N$ independent Reed-Solomon blocks. Each block consists of $k$ data codewords and $r$ error correction parity codewords.

Standard algebraic decoding allows correcting up to:

$$E_{\max} = \left\lfloor \frac{r}{2} \right\rfloor \text{ errors}$$

Because ordinary QR readers only read data codewords and use parity codewords strictly for error mitigation, intentional modifications to selected parity codewords remain invisible to standard readers, provided total modified codewords remain strictly within the error correction budget.


To prevent intentional differential codewords from compromising physical scanning reliability, PlyQR enforces a strict budget inequality per RS block:

$$\text{hidden_per_block} + \text{noise_reserve} \le \left\lfloor \frac{r}{2} \right\rfloor$$

Where:

  • hidden_per_block: Number of parity codewords allocated to carry covert differential bytes.
  • noise_reserve: Reserved error margin guaranteed for physical print defects, lens blur, scratches, and optical distortion.
  • r: Total Reed-Solomon parity codewords in the given QR version and EC level.

3. Byte Modulation & Private Layer RS Protection

Section titled “3. Byte Modulation & Private Layer RS Protection”
  1. Parity Codeword Modification: The differential bytes are XOR-masked onto pseudorandomly chosen parity codeword positions determined by key derivation.
  2. Private Layer ECC: Because physical scratches on the printed QR code could damage the modified parity codewords, PlyQR wraps the private differential stream in a secondary, independent Reed-Solomon error correction layer before modulation.
  3. Dual-Layer Recovery:
    • First, the standard QR RS engine cleans optical noise from the public data codewords.
    • Second, the PlyQR private RS engine reconstructs any differential bytes lost to physical damage.