Skip to main content
QUICK REVIEW

[Paper Review] QRscript specification

Stefano Scanzio, Matteo Rosani|arXiv (Cornell University)|Mar 7, 2024
QR Code Applications and Technologies4 citations
TL;DR

QRscript specification (v0.9) defines a standardized method to embed executable programming code into QR codes as eQR codes, using a structured binary format called eQRbytecode with a dialect-agnostic header. It enables execution of high-level code via virtual machines by encoding programs in binary or numeric mode, supporting features like padding, continuation across multiple codes, optional URL linking, security profiles, and extensible dialects for specialized applications such as decision trees.

ABSTRACT

This specification document specifies the syntax and semantics of QRscript. The current document only shows the part related to the QRscript header, i.e., the first part of the binary code that must be inserted into the QR code. A QR code containing an executable code is called an executable QR code (eQR code). QRscript supports different dialects, i.e., sublanguages with implementation characteristics specific to the application field. The specifications of the individual dialects will be described in separate documents.

Motivation & Objective

  • To define a standardized, extensible method for embedding executable high-level programming languages into QR codes as eQR codes.
  • To enable portable, self-contained program execution via QR code scanning and virtual machine interpretation on end-user devices.
  • To support diverse application domains through customizable dialects with specific instruction sets and execution semantics.
  • To ensure data integrity and authenticity through optional security mechanisms in the eQRbytecode header.
  • To allow dynamic content delivery via external URLs while maintaining backward compatibility and extensibility.

Proposed method

  • Define a binary format called eQRbytecode, composed of a dialect-independent QRscript header and a dialect-specific code section.
  • Structure the QRscript header into five components: padding, continuation, security, URL, and dialect/version identifiers, each with defined bit-lengths and semantics.
  • Use binary or numeric input modes from the ISO/IEC 18004 QR code standard to encode eQRbytecode, with padding applied only in binary mode when bit-length is not byte-aligned.
  • Support program splitting across multiple eQR codes via the continuation field, enabling large programs to be distributed across multiple QR codes.
  • Enable optional URL linking to external resources for richer content, with the URL field disabled by default via a leading bit.
  • Define a 4-bit dialect identifier and 4-bit version field to support extensible dialects, with exponential encoding for future scalability.

Experimental results

Research questions

  • RQ1How can a high-level programming language be consistently and securely embedded into a QR code to enable reliable execution on end-user devices?
  • RQ2What header structure is required to support multiple dialects, security, URL linking, and program continuation while remaining independent of the dialect?
  • RQ3How can the eQRbytecode be encoded within QR codes to ensure compatibility with existing QR standards and error correction levels?
  • RQ4What mechanisms are needed to ensure data integrity and authenticity in eQR codes without requiring external infrastructure?
  • RQ5How can the system support extensibility for new dialects and future enhancements while maintaining backward compatibility?

Key findings

  • The QRscript header enables a standardized, dialect-agnostic foundation for encoding executable programs into QR codes, supporting features like padding, continuation, security, URL linking, and dialect identification.
  • The specification supports up to 16 dialects (4-bit identifier) and 16 versions per dialect (4-bit version field), with extensibility via exponential encoding for future growth.
  • eQRbytecode can be encoded using either binary or numeric input modes in QR codes, with padding applied only in binary mode when the total bit length is not divisible by 8.
  • The continuation field allows splitting large programs across multiple eQR codes, enabling execution of programs larger than a single QR code’s capacity.
  • Security and URL features are optional and can be disabled via specific bit patterns (e.g., 0000 for security, 0 for URL), ensuring backward compatibility.
  • The specification enables execution of programs via a virtual machine on end-user devices after scanning, using a two-step translation: eQRbytecode → intermediate representation → execution.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.