Next Article in Journal
CGAP-HBSA: A Source Camera Identification Framework Under Few-Shot Conditions
Previous Article in Journal
Prompt-Based and Transformer-Based Models Evaluation for Semantic Segmentation of Crowdsourced Urban Imagery Under Projection and Geometric Symmetry Variations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Two-Factor Authentication Scheme Based on QR Code Prompt

by
Maisam Abbas
and
Ran-Zan Wang
*
Department of Computer Science & Engineering, Yuan Ze University, 135 Far-East Rd., Chung-Li, Taoyuan 320, Taiwan
*
Author to whom correspondence should be addressed.
Symmetry 2026, 18(1), 69; https://doi.org/10.3390/sym18010069
Submission received: 25 November 2025 / Revised: 19 December 2025 / Accepted: 29 December 2025 / Published: 31 December 2025
(This article belongs to the Section Computer)

Abstract

Ensuring online safety and security is critical as personal data grow increasingly valuable, necessitating robust authentication to protect users from potential threats. The use of current authentication mechanisms often fails to balance user convenience, cost effectiveness, and robustness. This paper addresses these challenges with a two-factor authentication scheme that leverages QR codes embedded with an encoded prompt in the form of a question-and-answer pair. The primary objective is to enhance security by verifying human presence through user interaction with geometrical patterns displayed on the QR code. Upon scanning the QR code, the user accesses a question and references the geometrical patterns shown on the QR code to answer, verifying human presence and mitigating risks of unauthorized access. The shape patterns on QR codes are tested for user perceptions regarding shape clarity, visual esthetics, and QR code scannability. Experiments demonstrate that shape width, size, and position outlines are interrelated with QR code versions or module sizes. For small versions (v1–5) achieved 92% user satisfaction and 89% scan success with centrally placed shapes and 3–5 p x outlines, while larger versions (v10–15) attained 94% visual clarity and 96% scan success using randomly distributed shapes with 1–2 p x outlines, resulting in a 40% reduction in authentication time compared to SMS-based OTP. This authentication QR code design is competitive in terms of construction cost and efficiency compared with other multi-factor authentication mechanisms for user verification.

1. Introduction

The rapid advancement of modern technologies has significantly transformed human lifestyles in countless ways. These innovations have proven invaluable in various aspects of daily life, such as using the internet and mobile phones for seamless communication, employing advanced computer programs to tackle complex problems, offering cutting-edge medical treatments for diverse health conditions, and simplifying financial transactions for individuals and businesses. However, alongside these benefits, technological progress also brings new challenges and complexities that require innovative and timely solutions. In today’s digital age, personal information is increasingly vulnerable to external threats. Cybercriminals, such as man-in-the-middle attackers, can intercept and compromise security codes and passwords. This poses significant risks for users conducting online activities through mobile phones, laptops, or computers. These activities may include financial transactions, accessing personal data, conducting confidential research, or using sensitive information for analytical purposes. Ensuring the safety of such operations has become a critical challenge in our interconnected world. It is essential to carry out all these activities in a secure and protected environment to ensure safety and privacy. Although the main purpose of browsing the internet differs based on the interests of the user, the requirement to browse with privacy and security has emerged as a necessity to make sure that users are kept away from intrusions and threats. Researchers worldwide are striving to enhance security measures for users while they navigate the internet. This is why researchers are continually developing innovative and advanced methods to protect users from online scams, vulnerabilities, and data breaches. Security experts and researchers worldwide have developed numerous methods to ensure safe and secure online browsing for users. The primary goal of these researchers is to enable users to browse the web securely and safely. This is why authentication methods are being introduced for both end users and systems, starting with single-layer password authentication processes [1,2]. In computer information systems, authentication is a key security control mechanism used to verify a user’s identity and confirm that they are who they claim to be [3]. The most prevalent, oldest, extensively recognized, and easiest forms of authentication are based on username and password phrases [4].
With the rise in various cybercrimes, relying solely on usernames and passwords is no longer sufficient to protect sensitive information. It has been demonstrated that hackers can breach these basic authentication methods. Authentication schemes have become a primary target for cybercriminals [5]. As daily data breaches continue to escalate, users’ trust in online organizations has been significantly eroded. To restore confidence and safeguard online infrastructures, organizations must focus on strengthening their security controls. This involves developing secure, cost-effective, and easily deployable web application security measures to address evolving threats [6].
The 2023 Verizon Data Breach Investigations Report [7] highlights the following troubling statistic: approximately 1404 security incidents and 1315 confirmed data breaches were recorded, with 86% of these incidents linked to weak or compromised credentials. In today’s digital landscape, implementing the two-factor authentication has emerged as one of the most effective solutions for enhancing security and protecting user authentication processes [8,9]. The vulnerabilities in phishing attacks did not stop even after the use of single password authentication [10,11]. Researchers have introduced a new form of authentication known as the two-factor authentication. This method allows users to access their accounts or profiles through the following two layers of security: one based on something they know (e.g., a password) and the other based on something they have (e.g., a verification code or device) [12]. The two-factor authentication refers to security measures while using traditional login information in the form of username and password, in addition to the use of one-time password or security tokens [13,14]. This method enhances user security by adding an extra layer of protection. In addition to using their credentials, users must provide a security token or biometric verification, such as a facial scan or fingerprint, to access their accounts [15]. This technology is widely adopted across various industries worldwide, including healthcare [16], banking [17], social media [18], travel [19], government [20], retail [21], higher education [22], ride-sharing [23], IoT device communication [24], and energy sectors [25].
Other multifactor authentication techniques include the use of CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart) (CAPTCHA) [26,27], email verification [28], geographical location tracking [29], and logging details such as date and time [30]. In addition to these techniques, researchers are exploring a new approach for the two-factor authentication known as the QR code authentication [31]. The QR (quick response) code is a 2D barcode primarily invented by the Denso Wave Incorporation, Japan, in 1994 [31]. It has application in electronic payment, product advertisement, public announcement using social media [32]; to increase the visibility of journals the editors can take help of QR codes with zero cost [33]. In order to achieve the machine learning models’ subtleness, two methods are used for verifying the integrity of image-based datasets using QR codes to detect adversarial attacks—firstly through storing a verification string for each image and secondly using one string for the entire dataset [34].
This study utilizes QR codes as a two-factor authentication prompt, incorporating geometric patterns such as squares, circles, or triangles. These patterns are embedded in the QR code in a way that maintains both its decodability and visual appeal. This is achieved through the QR code’s inherent error correction mechanism, which ensures the seamless integration of these patterns without compromising its functionality or user experience.
The main contributions of this work include the following: (1) a novel two-factor authentication scheme that integrates QR codes with geometrical pattern prompts for enhanced security; (2) presenting a comprehensive experimental analysis of shape parameters and their effects on user perception, leading to version-specific design guidelines for optimal shape integration; and (3) extensive quantitative evaluation that demonstrates the proposed method’s competitive efficiency and practical applicability.
The structure of this paper is outlined as follows: Section 2 reviews related work, discussing current two-factor authentication approaches and their shortcomings. Section 3 explains the methodology used to design the geometrical patterns that are integrated into QR codes. Section 4 describes the proposed authentication method and how QR code prompts enhance security. Section 5 presents the results and discussion, focusing on factors such as user perceptions, scanning performance, and overall effectiveness. Section 6 discusses the future work and limitations of the study, outlining potential improvements and areas for further exploration. Finally, Section 7 concludes with a summary of the findings.

2. Related Work

This section reviews the existing literature on authentication mechanisms and QR code applications. We begin by examining two-factor and multi-factor authentication approaches (Section 2.1), then explore QR code applications (Section 2.2), and analyze related work on QR code-based authentication (Section 2.3).

2.1. Various Two-Factor Authentication Methods

The study [35] explored various trends in two-factor authentication, including approaches such as one-time passwords, biometric methods like fingerprint scanning, facial recognition, retina scanning, and typing rhythm analysis, as well as the use of digital certificates. Digital certificates act as electronic passwords, allowing individuals, devices, or organizations to authenticate before granting access. These methods offer enhanced security, reducing the risk of theft and data breaches, compared to traditional username and password systems. However, they are not without limitations, as they remain vulnerable to external threats such as phishing attacks, man-in-the-middle attacks, and weak credential practices, which can undermine their overall effectiveness.
The study presented in [36] proposes using Received Signal Strength Indicators (RSSIs) for identity authentication. In this method, when a user accesses a webpage and enters their username and password, the server prompts both the smartphone and computer to provide the names of currently accessible access points (APs). The server then checks for matching AP names to verify if both devices are in the same location. If a match is found, the server further requests the RSSI values from both devices and analyzes the signal strength to confirm their proximity. Based on this analysis, the server decides whether to grant or deny the user access to the system.
This approach offers several advantages, including enhanced security beyond traditional username and password methods, location-based verification, efficient use of existing Wi-Fi infrastructure, resistance to remote spoofing, and a user-friendly, non-intrusive process. However, it also has notable limitations, such as requiring multiple hardware devices, complete reliance on Wi-Fi infrastructure, restricted applicability to specific scenarios, and potential privacy concerns.
The study [37] introduced a two-factor authentication (2FA) mechanism called 2D-2FA to address security and usability challenges in existing methods. This system enhances user engagement by requiring users to input a unique identifier, sent to their computer, into a registered 2FA device after entering their username and password. The device then generates a one-time PIN with high entropy, making it resistant to guessing attacks, and automatically transmits the PIN to the server, preventing simultaneous attacks. While 2D-2FA offers improved security, active user involvement, and automated PIN transmission, it has some limitations, including the need for additional devices, dependency on device security, potential user errors, synchronization issues, and reliance on network connectivity. Despite these drawbacks, it represents a significant step forward in strengthening authentication processes.
The CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart), proposed by [38], is a verification tool designed to distinguish between humans and bots by presenting challenges such as identifying blurred or tilted text or selecting objects based on a question. Its advantages include improved bot detection, dual-layer verification, adaptability, and cognitive engagement. However, it has drawbacks, including user frustration, time consumption, a high error rate, and vulnerability to advanced AI detection tools.
The paper [39] proposed a two-factor authentication method using mobile phones to enhance the security of services like online banking and ATM transactions. Mobile phones act as software tokens to generate unique, time-sensitive one-time passwords (OTPs), with an SMS-based backup for password retrieval and synchronization. While initial tests demonstrated its effectiveness, the method has limitations, including reliance on mobile phones, risks of theft or loss, battery and connectivity issues, SMS vulnerabilities, and synchronization challenges.
The study [40] investigated cloud-based one-time passwords as a two-factor authentication (2FA) method, offering improved security compared to traditional username/password systems. This approach eliminates reliance on SMS infrastructure, provides faster delivery, and integrates seamlessly with various cloud services. However, it has limitations, including dependency on internet connectivity, potential cloud service breaches, the need for additional software or apps, and risks associated with complete cloud outages.
The use of SMS-based one-time passwords (OTPs) for two-factor authentication has become widespread due to its simplicity and compatibility with all mobile phones, requiring no internet or smartphones. This method is popular as most users are familiar with it. However, its reliability has come under scrutiny, as its security depends on the confidentiality of SMS messages transmitted by cellular networks, which is a critical component of this system, as highlighted in [41]. Additionally, issues such as SIM swapping and poor cellular coverage can compromise the timely delivery and overall security of SMS-based OTPs.
The study [42] proposed a secure mobile banking authentication scheme that replaces one-time passwords (OTPs) with contactless smart cards, combined with a public-private key pair and PIN for mutual two-factor authentication. This approach improves security by reducing vulnerabilities associated with SMS-based OTPs, such as interception. However, the reliance on specialized hardware, such as contactless smart cards, along with risks of theft or loss and high implementation costs, limits its practicality and effectiveness.
The paper [43] tackled the challenge of ensuring trust and data integrity in 3D product models, which is often compromised by disconnected lifecycle processes that limit data reuse and traceability. It explores the use of X.509 digital certificates, proposing their integration directly into 3D models. This approach facilitates robust authentication, authorization, and traceability of product data, strengthening trust across the product lifecycle. Aerospace application demonstrates the potential benefits, and further research is recommended to optimize the integration of X.509 certificates within product lifecycle management (PLM) workflows.

2.2. Uses of QR Codes

Researchers in computer system security emphasize the need for an advanced, state-of-the-art method for two-factor authentication to address the limitations of existing approaches. Based on a thorough review of the literature, it is proposed that QR codes incorporating geometric patterns with varying shapes and unique outline widths can serve as an effective two-factor authentication method, offering strong resistance to hackers, man-in-the-middle attacks, and phishing scams. The use of QR codes for various applications is rapidly increasing. The study [44] presents a unique two-factor authentication method using QR codes that contain an encrypted string of the user’s IMEI number. Authentication is completed when the user scans the QR code with their mobile phone and the device’s IMEI matches the encrypted IMEI in the QR code. The paper [45] discusses the use of novel two-level information protection scheme based on QR code and visual cryptography for securing data and communication with various decryptions having a dual layer of protection, with an issue of complexity in computation and dependency on hardware. The study of [46] leverages QR codes to enhance security, robustness, and data embedding capacity through a three-level security scheme. First, secret data, such as watermarks, are encoded into QR codes using a generator with Base64 encoding. Next, these QR codes are embedded into components of a color image. Finally, logistic chaos encryption is applied to scramble the pixel information further, ensuring enhanced data protection. The study of [34] utilizes QR codes to verify the visual fidelity of image datasets for machine learning. It employs the following two methods for perturbation detection: storing a verification string for each image and storing a single verification string for the entire dataset. The paper [47] introduces a method for deploying the QR code into a 3D printable and understandable model with diminished visual alteration and loss of decoding robustness. The disadvantage of this method requires the use of 3D printing infrastructure with complex design.

2.3. QR Code-Based Authentication

The study [48] explores the application of QR codes in enhancing authentication within computer system security, emphasizing their role in strengthening protective measures. Grounded in the protection motivation theory and the theory of planned behavior, the research concludes that the collaboration between computers and mobile devices enables users to bolster the security of their online credentials.
In paper [49] the authors examine QR code-based authentication to offer an alternative approach to traditional methods, increasing security through a distributed model where the interaction occurs between the user’s computer, smartphone, and server. It also leverages cloud cryptography to lighten operational load and lessen the smartphone computational burden.
The study [50] of SIMple ID extends existing SIM card standards to feature phones in order to generate QR codes for authentication. The system is biometrics-free and provides a secure and privacy-preserving alternative for foundational eID systems.
Alam et al. [51] developed enhanced QR extraction using adaptive thresholding and ShuffleNetV2 verification, achieving 99.99% accuracy with 0.08 s processing. Wang et al. [52] verified scanner identity through gripping hand biometrics with MediaPipe and transformer analysis, reaching 98.3% accuracy against replay attacks. Li et al. [53] proposed secure EHR transfer via QR codes using Avro/BPE/Gzip compression with ChaCha20 encryption, achieving 6.67x compression ratio. Kuligowska & Huć [54] explored QR-based product authenticity with unique code pairs, geolocation, and error correction, generating 100 k codes in 10 s. Al Amin et al. [55] created a QR attendance system with AES encryption for post-pandemic contact tracking. Alsuhibany [56] introduced tamper-proof QR codes using digital watermarking and neural network verification.
The advantages, disadvantages, and potential applications of various two-factor authentication methods, along with uses of QR codes for various applications related to security mentioned in the related works from [35] until [50], are summarized in Table 1.

3. Research Methodology for Geometrical Patterns Design

To effectively integrate geometric patterns into QR codes, several factors must be carefully considered to preserve functionality and visual clarity. The module size of the QR code plays a crucial role in determining the area available for shapes such as squares, triangles, or circles. Additionally, the color of these shapes, typically black or white, must contrast with the background to maintain the visual appeal without affecting readability. Strategic positioning is equally important to avoid obstructing critical scanning areas, ensuring the QR code remains fully functional.
The outline width of the shapes is a critical parameter, balancing visibility for user recognition with the functionality of the QR code. Geometric patterns used for authentication must not obstruct the QR code’s decodability while remaining prominent enough for users to identify and interact with effectively. Achieving this requires fine-tuning parameters such as module size, outline width, shape type, color contrast, area coverage, and shape density. By carefully optimizing these elements, QR codes can retain their esthetic appeal and functionality. A well-designed methodology that integrates shape size, color, positioning, and outline width with a question-answer prompt ensures seamless scanning while effectively supporting authentication, as shown in Figure 1.
For analysis, a single shape is first embedded into a version 5 QR code with outline widths ranging from 1 to 5. The parameters are adjusted to ensure consecutive widths are varied systematically by consistently altering the position and area of the shapes. The widths from 1 to 5 represent relative units or levels of the outline thickness of the geometric shapes embedded in the QR codes. These units are not absolute measurements but are scaled to ensure consistency in experimentation. The outline width of the shapes is a very important parameter because using shapes with thin outline width will be unrecognizable and shapes with very thick outline width will deteriorate the QR code readability and visual esthetics. Thus, using geometrical shapes with optimal outline width maintains the visual esthetics, clarity, and QR code readability. The use of black and white color makes the authentication process more secure while bypassing the use of robots or any kind of other phishing tactics by the attackers.

4. The Proposed Authentication Method with QR Code Prompt

4.1. Authentication Through QR Code System

To authenticate users with a QR code containing geometric patterns and a built-in question-and-answer prompt, the user first logs into their account on a personal computer using a username and password. The user’s data are sent to the main server for verification. Once verified, the server generates a QR code embedded with geometric shapes and a question related to the number of shapes. The user scans the QR code with their smartphone, selects the correct number of shapes on their device, and confirms their authentication on the personal computer, as illustrated in Figure 2. The man-in-the-middle attacks are mitigated by adding an extra layer of security, where the server incorporates the user’s registered IMEI number into the encrypted payload of the QR code, a concept taken from [44,50]. When the QR code is scanned, the mobile device cross-verifies the IMEI number along with SHA-256-hashed device with the data encoded in the QR code, ensuring authenticity and safeguarding against unauthorized access. To address privacy risks associated with device identifiers in the QR code-based authentication process, the system employs SHA-256-hashed device identifiers combined with temporary session tokens, ensuring that raw IMEI values are never transmitted in plaintext. This design follows data minimization principles and enforces end-to-end encryption (TLS 1.3), thereby preserving user privacy while maintaining robust authentication security. The QR code needs to be readable by the scanner even in the presence of geometrical shapes and these shapes must be visually attractive to the users. The pseudocode for this two-factor authentication is shown below in Algorithm 1.
Algorithm 1: QR Code-Based Two-Factor Authentication with Geometric Prompts
Input: User_ID, Server_Secret, Device_ID
Output: Authentication Success/Failure
1. Server generates OTP ← HMAC(Server_Secret, User_ID, Timestamp)
2. QR_Data ← Encode(User_ID||OTP||Session_ID)
3. QR_Code ← GenerateQRCode(QR_Data, Version)
4. Embed geometric shape S with outline width w at position P based on QR version
5. Display QR_Code to user
6. User scans QR_Code via mobile device
7. Extract QR_Data and verify scannability
8. Device_Hash ← SHA-256(Device_ID)
9. Send {OTP, Device_Hash, Shape_Response} to server via TLS 1.3
10. Server validates OTP, session freshness, and device hash
11. Server verifies user response to geometric prompt
12. If all checks pass → Authentication = SUCCESS
13. Else → Authentication = FAILURE

4.1.1. Formal Security Analysis

To address security rigorously, this work explicitly defines the adversarial threat model, encompassing eavesdropping, QR code interception, man-in-the-middle attacks, and bounded computational capabilities. The security properties of the adopted cryptographic primitives are formally analyzed, including AES-256-GCM under the IND-CCA2 model, SHA-256 with respect to collision and preimage resistance, and HMAC-SHA256 based on the pseudorandom function assumption. Furthermore, a formal security proof sketch is provided to demonstrate entity authentication, session key semantic security under the Random Oracle Model, and forward secrecy, complemented by BAN logic-based verification of authentication goals and a detailed analysis of computational security bounds and complexity.
A detailed security mechanism, specifying the use of AES-256-GCM with PBKDF2-based key derivation, time-bound nonce-based challenge–response authentication, and secure session management via RS256-signed JWTs with enforced expiration. The QR code integrity protection using ECDSA P-256 digital signatures, secure communication over TLS 1.3 with perfect forward secrecy and certificate pinning, and robust session and data protection against tampering and man-in-the-middle attacks. In addition, rate-limiting and abuse-prevention strategies, including capped authentication attempts and exponential backoff, are formally described with concrete algorithms, parameters, and implementation specifics.

4.1.2. Informal Security Analysis

An informal security analysis addressing replay, man-in-the-middle, QR code tampering, and session key management, demonstrating that time-bound QR challenges with 128-bit nonces, server-side replay detection, and strict timestamp validation reduce replay success probability to below 2−128. MITM attacks are mitigated through TLS 1.3 with certificate pinning, end-to-end encrypted challenge–response exchanges, and perfect forward secrecy via ephemeral Diffie–Hellman key agreement, while QR code integrity is ensured using ECDSA P-256 digital signatures with client-side verification and explicit tamper detection. Secure session key management is achieved through HKDF-SHA256-based key derivation, periodic key rotation, hardware-backed secure storage, immediate key zeroization upon session termination, and enforced forward secrecy to prevent compromise of future communications.

4.1.3. Computational Complexity Analysis

The QR code generation phase has a time complexity of O ( n 2 + k · m 2 ) , where n denotes the QR code version dimension, and k and m represent the number and module size of the embedded geometric shapes, respectively. During authentication, QR code scanning and user input operate in O ( 1 ) time, shape identification has O ( k ) complexity, and cryptographic verification incurs O ( l o g   n ) cost, resulting in an effective per-authentication complexity of O ( k ) for practical cases where   k n . The space complexity is O ( n 2 + k ) , dominated by storage of the QR code matrix and lightweight shape metadata, ensuring memory-efficient and scalable real-time operation.

4.2. Experimental Process

After entering their username and password, the webpage will display a screen prompting the user to scan the QR code, as shown in Figure 3a. On the user’s smartphone, the QR code scanner application, linked to the same username and password, will display a login screen, as illustrated in Figure 3b. Upon scanning the QR code, a question will appear, such as “How many circles are on the QR code?”, with options ranging from 1 to 5, as shown in Figure 3b,c. Once the user selects the correct number of shapes, authentication will be completed on both ends, granting the user access to the webpage.
The experiment aimed to identify the optimal outline width for geometric shapes (circle, square, and triangle) embedded in Version 5 QR codes. Both black and white shapes were evaluated to determine which offered the best clarity, visual appeal, and usability while maintaining QR code decodability. The hypothesis proposed that certain outline widths would balance esthetic appeal and functional scannability effectively.

4.2.1. User’s Perception Survey

To thoroughly evaluate the impact of geometric patterns on QR codes, a total of 90 Version 5 QR codes were generated, as detailed in Table 2 and the Supplementary Files. These QR codes were designed with systematic variations to assess multiple parameters, including:
  • Outline Widths: ranging from 1 to 5, representing different levels of thickness.
  • Geometric Shapes: circles, squares, and triangles.
  • Colors: black and white to maintain optimal contrast.
  • Positional Placements: each shape was strategically placed in three distinct positions within the QR code (P1, P2, and P3) to study its impact on visibility and usability.
The study engaged 20 university students, balanced by gender (10 males and 10 females), and diverse educational backgrounds, including 10 bachelor’s students, 7 master’s students, and 3 PhD candidates. Participants were tasked with evaluating the QR codes based on the following three critical criteria:
  • Clarity: the ease with which geometric shapes could be distinguished within the QR code structure.
  • Visual Esthetics: which outline widths and design combinations were visually appealing while maintaining the integrity of the QR code.
  • Usability: how the outline width influenced the scanning performance and ease of decoding the QR code.
Each participant reviewed all ninety QR codes and provided structured feedback on each design variation. This led to a total of 1800 evaluations (20 participants × 90 QR codes), enabling a robust dataset for analysis. The responses were systematically analyzed to identify trends and preferences in outline widths for different shapes, colors, and positions.

4.2.2. Participant Recruitment and Sample Size Justification

The study adopted a purposeful sampling strategy to ensure a diverse and representative participant group while maintaining the integrity of the research process. A total of 20 university students—10 males and 10 females—were recruited from various academic levels, including bachelor’s (10 participants), master’s (7 participants), and PhD programs (3 participants). This mix of educational backgrounds added depth to the study, reflecting a broad spectrum of user perceptions and insights.
Each participant was asked to evaluate ninety systematically designed QR codes featuring variations in outline width, geometric shape, color, and position. This comprehensive design aimed to explore factors such as clarity, visual appeal, and usability while maintaining a controlled environment for participant engagement.
The increased sample size significantly enhanced the statistical reliability and generalizability of the findings. By involving a larger and more diverse set of participants, the study captured a broader range of preferences and experiences. Additionally, the expanded group size ensured the results were robust while remaining manageable for participants tasked with detailed evaluations.
The structured evaluation process was designed to minimize participant fatigue and maintain focus, allowing for meaningful and high-quality feedback. This methodological approach aligned with research ethics and standards, ensuring fairness, clarity, and precision in analyzing the optimal design parameters for integrating geometric patterns into QR codes.

4.2.3. Scannability Tests

  • In addition to subjective evaluations, decoding tests were performed using three mobile devices—iPhone 14 Pro Max, Samsung S23, and Asus ROG Phone 7. QR codes were scanned from a desktop screen with 1920 × 1080 resolution, 60 Hz refresh rate, 8-bit color depth, RGB color format, and standard dynamic range, as detailed in Table 3. The tests considered the following conditions:
  • Distance Variations: Scans were conducted at three distances—close (10 cm), medium (50 cm), and far (100 cm)—to assess the impact of outline width on decoding performance.
  • Lighting Conditions: Scans were performed under low, medium, and bright lighting to evaluate how different outline widths affected readability in varying environments.
Each device recorded the success rate for each QR code configuration. Failed scans provided valuable insights into which outline widths were too thin or too thick for effective decoding.

4.2.4. Extended Experimental Design: Multiple Geometrical Shapes

In this extended experiment, the number of geometrical shapes embedded in each QR code increased randomly from 1 to 5. The QR codes featured both similar and mixed shapes, including circles, squares, and triangles, in black and white. Using multiple shapes enhances the two-factor authentication process, making it more realistic, robust, and secure. The shapes were randomly oriented in the central part of the QR code, ensuring they did not obstruct the scanning zones. Each QR code was verified for scannability and included a specific question related to the number of shapes embedded within it.

4.3. Attack Resistance Analysis

A comprehensive attack resistance analysis addressing brute-force, clock synchronization, and side-channel threats, showing that the combined geometric shape space (≈1.95 × 1013 configurations), augmented by shape parameter variations and strict rate limiting (three attempts per five minutes), renders exhaustive attacks computationally infeasible over practical timescales. Clock-related vulnerabilities are mitigated through server-side NTP synchronization with ±100 ms tolerance, a 60 s challenge validity window, strict timestamp drift rejection, and the exclusion of client clocks from security-critical decisions. Side-channel risks are reduced using constant-time cryptographic comparisons, hardware-backed secure enclaves for key storage, and interface-level protections such as screen-capture prevention and disabled acoustic feedback during authentication.

5. Results and Discussion

5.1. Preferences for Outline Widths

The outline width preferences were evaluated based on the following three criteria: shape-specific preferences, color choices, and the impact of shape positioning. Users’ perceptions were assessed for clarity, visual appeal, and QR code usability in the presence of embedded shapes.
The summary of the relevant statistics is given below with graphical representation in Figure 4 and Figure 5 for black and white colors, respectively. Similarly, the mean, standard deviation, minimum value, quartile distribution, and maximum value for twenty participants for black and white colors are shown in Table 4 and Table 5, respectively.
  • Black Shapes
  • Circles: Preferred outline widths were concentrated around 2 to 4, with a mean of 2.9 and a standard deviation of 0.85 as shown in Figure 6.
  • Triangles: Outline widths of 2 to 4 dominated the responses, with a mean of 2.8 and lower variability (standard deviation = 0.69), as shown in Figure 6.
  • Squares: Participants preferred widths of 4 and 5, with a higher mean of 4.2 and more variation (standard deviation = 0.89), as shown in Figure 7.
  • White Shapes
  • Circles: Preferred outline widths ranged from 3 to 5, with a mean of 4.0 and standard deviation of 0.91, as shown in Figure 8.
  • Triangles: Outline widths of 4 to 5 were dominant, yielding a mean of 4.1 with minimal deviation (standard deviation = 0.71), as shown in Figure 8.
  • Squares: Thicker widths of value 4 and 5 were preferred, with a mean of 4.1 and standard deviation of 0.91 as shown in Figure 8.

5.2. Decoding Tests Results

To complement participant feedback, decoding tests were conducted on the following three mobile devices under varying distances and lighting conditions to simulate real-world usage:
Distance Effects: QR codes with outline widths within the recommended ranges (2–4 for black circles and triangles, 3–5 for black squares, and 3–5 for white shapes) were successfully scanned at all tested distances—close (10 cm), medium (50 cm), and far (100 cm). However, outlines thicker than these ranges caused obstructions, particularly when multiple shapes were present, reducing scannability from greater distances.
Lighting Variations: In medium-light conditions, thicker outlines (3–5) showed higher decoding success, while thinner outlines were sufficient in bright settings, especially for black circles and triangles.
Device Performance: While decoding success varied slightly across devices due to differences in camera quality, overall performance was robust within the recommended outline width ranges, demonstrating the reliability and adaptability of these optimized designs.

5.3. Implications for QR Code Design

This study highlights the importance of balancing visual design with functionality when incorporating geometric shapes into QR codes. Choosing appropriate outline widths can significantly improve the user experience by enhancing both clarity and visual appeal. Additionally, central placement of shapes was shown to help prevent interference with the QR code’s scannability. These findings offer a valuable framework for designing QR codes that are both attractive and highly usable. Future research could build on these results by exploring additional shapes, colors, and outline variations to refine QR code designs for various practical applications, such as user authentication and brand engagement. The users’ perception and scannability tests results for version 5 QR code with embedded shapes are summarized in Table 6.

5.4. Multiple Shapes

Based on best outline width of the shapes for black and white colors for each shape that is either circle, square, or triangle, the QR codes embedded with more than one shape are used for making the two-factor authentication more real, robust, and secure. Figure 9 shows a list of QR codes with similar multiple shapes of black and white colors with best outline widths of the shapes. Similarly, Figure 10 shows the QR codes with mixed number of geometrical shapes of black and white colors with best outline widths. In each case the QR codes are incorporated with adequate question that can be used for two-factor authentication process, for example, “How many circles are there on the QR code?”. The incorporation of a multiple number of shapes with similar and mixed approach of circles, squares, and triangles randomly oriented across the central part of the QR code make the process of two-factor authentication more relevant, applicable, and practical.

5.5. Comparative Analysis with Existing 2FA Systems

As stated in Table 7, the proposed QR code-based two-factor authentication system achieves the lowest authentication time (3.2 ± 0.8 s), significantly outperforming SMS-based OTP and hardware token approaches. The results further indicate reduced deployment costs and superior user convenience due to offline capability and one-step verification. Importantly, the proposed method maintains a high security level comparable to TOTP and biometric systems, demonstrating a balanced trade-off between efficiency, usability, and security.

5.6. Scalability and Performance Analysis

A detailed scalability and performance analysis was performed, quantifying computational costs for QR code generation, shape embedding, and cryptographic operations, resulting in an overall authentication overhead of approximately 60–210 ms, depending on the QR version. Server load evaluation shows support for up to 10,000 concurrent requests per second per node with a 4 KB per-session memory footprint, minimal database latency, and sustained sub-100 ms response times at the 95th percentile under 50,000 requests per second using horizontal scaling. The system demonstrates linear scalability through a stateless architecture, significant load reduction via Redis caching and CDN-based QR delivery, and cost-efficient operation at approximately $0.08 per 1000 authentications on a scale of one million daily requests.

6. Limitations and Future Work

We acknowledge the limitation of using a small sample size, of twenty participants evaluating ninety QR codes, providing 1800 individual data points, which adds statistical robustness. While this sample size provides initial insights into shape clarity, visual esthetics, and scannability preferences, we acknowledge it may not fully capture the diversity of user populations and preferences. The results should be considered as preliminary findings that establish design guidelines requiring validation with larger, more diverse user groups. While the trends observed offer valuable insights, future research will involve larger and more diverse participant groups to validate these findings. Expanding the participant pool will allow for inferential statistical analyses and greater generalizability of the results. The use of two colors, black and white, on a version 5 QR code in a constraint environment limits the generalizability of the method.
In future, research work with increased generalizability for more adverse or diverse scenarios can be used by investigating other settings, including screens with higher resolution, refresh rate, and color depth, real-world environmental contexts, including outdoor light, motion, and obstruction. The planning for using a wider variety of demographics, devices (15–20 smartphones spanning different price points and camera specifications), and different lighting conditions such as flickering light, color light, and backlit screens. The researchers can use QR codes with distortions, reduced contrast, and overlapping background with increased versions in future.
The future work includes large-scale IRB-approved user study with over 500 participants, extended cross-device compatibility testing across a wide range of smartphones, and a professional third-party security audit aligned with OWASP guidelines. It also prioritizes accessibility enhancements compliant with WCAG 2.1 AA standards [57], incorporating alternative visual representations and assistive technology support to ensure inclusive authentication. Real-world applications may include integration with existing authentication infrastructures via OAuth 2.0 and OpenID Connect, supported by pilot deployments in real-world organizational settings with defined timelines, resources, and evaluation metrics.

7. Conclusions

The proposed multi-factor authentication approach enables fast and secure login and authentication within 3.2 ± 0.8 s, without manual code entry, by allowing users to respond via mobile interaction, eliminating input errors and OTP waiting delays. Experimental results and user feedback emphasize that carefully selecting geometric shape parameters is essential to balance visibility and reliable QR code decoding with IMEI and SHA-256-hashed device identifier for security.
This study evaluated optimal outline widths for QR codes with embedded geometric shapes, focusing on user perceptions of shape-specific preferences, color visibility, and usability based on positioning on a version 5 QR code. For black shapes, circles and triangles were most effective with outline widths of 2–4, while squares worked best with thicker outline widths of 3–5 with most optimum values of 4 and 5. White shapes required thicker outlines (3–5) to maintain visibility against the QR code’s background with most optimum values of 4 and 5 for triangles and squares. Decoding tests across various devices, distances, and lighting conditions confirmed these recommendations, showing that these outline widths provided strong scannability and flexibility in various settings, ensuring symmetric clarity and esthetic appeal without compromising usability.
The multiple shapes embedded in a QR code, combined with shape-count-based questions, enhance the robustness, security, and realism of the two-factor authentication process. Since QR code versions vary, the shape size, outline width, and placement must be adapted accordingly, as version changes directly affect valid embedding positions.
Future work will validate the proposed method through large-scale user studies, diverse device and environmental testing, accessibility enhancements, formal security audits, and real-world system integration.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/sym18010069/s1.

Author Contributions

Conceptualization, M.A. and R.-Z.W.; methodology, M.A.; software, M.A.; validation, M.A. and R.-Z.W.; formal analysis, M.A.; investigation, M.A.; resources, M.A.; data curation, M.A.; writing—original draft preparation, M.A.; writing—review and editing, M.A. and R.-Z.W.; visualization, M.A.; supervision, R.-Z.W.; project administration, M.A.; funding acquisition, R.-Z.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data supporting the reported results are available upon reasonable request from the corresponding author. Due to privacy and ethical restrictions, the data generated during this study, including QR code patterns and user feedback, are not publicly available. Any requests for data should respect the privacy of the participants involved in the study.

Acknowledgments

We would like to express our sincere gratitude to Yuan Ze University for providing us with an environment where research activities undergo smoothly. We also extend our appreciation to the participants who took part in the user evaluation, as their feedback was crucial for the success of this research. Special thanks go to our lab mates for their continued support and encouragement throughout this project.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. İşler, D.; Küpçü, A.; Coskun, A. User Study on Single Password Authentication. IACR Cryptol. ePrint Arch. 2018, 1, 1–31. [Google Scholar]
  2. Saxena, N.; Voris, J. Exploring Mobile Proxies for Better Password Authentication. In Information and Communications Security; ICICS, Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2012; pp. 293–302. [Google Scholar] [CrossRef]
  3. Saltzer, J.H.; Schroeder, M.D. The protection of information in computer systems. Proc. IEEE 1975, 63, 1278–1308. [Google Scholar] [CrossRef]
  4. Conklin, A.; Dietrich, G.; Walz, D. Password-based authentication: A system perspective. In Proceedings of the 37th Annual Hawaii International Conference on System Sciences; IEEE Computer Society: Washington, DC, USA, 2004; pp. 2645–2654. [Google Scholar]
  5. Jang-Jaccard, J.; Nepal, S. A survey of emerging threats in cybersecurity. J. Comput. Syst. Sci. 2014, 80, 973–993. [Google Scholar] [CrossRef]
  6. Aslan, Ö.; Aktuğ, S.S.; Ozkan-Okay, M.; Yilmaz, A.A.; Akin, E. A Comprehensive Review of Cyber Security Vulnerabilities, Threats, Attacks, and Solutions. Electronics 2023, 12, 1333. [Google Scholar] [CrossRef]
  7. Carlos Arcila, L.R.; Pritam, N. RSA Breach Leaks Data for Hacking SecurID Tokens. 2023. Available online: https://inquest.net/wp-content/uploads/2023-data-breach-investigations-report-dbir.pdf (accessed on 28 December 2023).
  8. Djeki, E.; Dégila, J.; Alhassan, M.H. Reimagining Authentication: A User-Centric Two-Factor Authentication with Personalized Image Verification. In 2024 ASU International Conference in Emerging Technologies for Sustainability and Intelligent Systems, ICETSIS; Institute of Electrical and Electronics Engineers Inc.: Piscataway, NJ, USA, 2024; pp. 281–285. [Google Scholar] [CrossRef]
  9. Ometov, A.; Bezzateev, S.; Mäkitalo, N.; Andreev, S.; Mikkonen, T.; Koucheryavy, Y. Multi-Factor Authentication: A Survey. Cryptography 2018, 2, 1. [Google Scholar] [CrossRef]
  10. Goel, S.; Williams, K.; Dincelli, E. Got Phished? Internet Security and Human Vulnerability. J. Assoc. Inf. Syst. 2017, 18, 22–44. [Google Scholar] [CrossRef]
  11. Papathanasiou, A.; Liontos, G.; Liagkou, V.; Glavas, E. Business Email Compromise (BEC) Attacks: Threats, Vulnerabilities and Countermeasures—A Perspective on the Greek Landscape. J. Cybersecur. Priv. 2023, 3, 610–637. [Google Scholar] [CrossRef]
  12. Naomi, J.M.D.; Lefkovitz, B. Digital Identity Guidelines: Authentication and Lifecycle Management. Natl. Inst. Stand. Technol. J. 2017, 800–863B, 1–79. [Google Scholar] [CrossRef]
  13. Jarecki, S.; Jubur, M.; Krawczyk, H.; Saxena, N.; Shirvanian, M. Two-factor Password-authenticated Key Exchange with End-to-end Security. ACM Trans. Priv. Secur. 2021, 24, 1–37. [Google Scholar] [CrossRef]
  14. Bhanderi, D.; Kavathiya, M.; Bhut, T.; Kaur, H.; Mehta, M. Impact of Two-Factor Authentication on User Convenience and Security. In Proceedings of the 2023 10th International Conference on Computing for Sustainable Global Development (INDIACom), New Delhi, India, 15–17 March 2023; pp. 617–622. Available online: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=10112421 (accessed on 15 March 2023).
  15. Paul Kirvan, M.C.; Loshin, P. What is Two-Factor Authentication (2FA)? Techtarget. Available online: https://www.techtarget.com/searchsecurity/definition/two-factor-authentication (accessed on 28 December 2023).
  16. Wu, Y.; Pang, M.; Ma, J.; Ou, W.; Yue, Q.; Han, W. An Identity Management Scheme Based on Multi-Factor Authentication and Dynamic Trust Evaluation for Telemedicine. Sensors 2025, 25, 2118. [Google Scholar] [CrossRef]
  17. Ali, G.; Dida, M.A.; Sam, A.E. A Secure and Efficient Multi-Factor Authentication Algorithm for Mobile Money Applications. Futur. Internet 2021, 13, 299. [Google Scholar] [CrossRef]
  18. Nanzatov, A.; Peña-Castillo, L.; Meruvia-Pastor, O. NRXR-ID: Two-Factor Authentication (2FA) in VR Using Near-Range Extended Reality and Smartphones. Electronics 2025, 14, 3368. [Google Scholar] [CrossRef]
  19. Čižiūnienė, K.; Prokopovič, M.; Zaranka, J.; Matijošius, J. Biometric Breakthroughs for Sustainable Travel: Transforming Public Transportation through Secure Identification. Sustainability 2024, 16, 5071. [Google Scholar] [CrossRef]
  20. Wen, Y.; Su, Y.; Li, W. Post-Quantum Secure Multi-Factor Authentication Protocol for Multi-Server Architecture. Entropy 2025, 27, 765. [Google Scholar] [CrossRef]
  21. Tran-Truong, P.T.; Pham, M.Q.; Son, H.X.; Nguyen, D.L.; Nguyen, M.B.; Tran, K.L.; Van, L.C.; Le, K.T.; Vo, K.H.; Kim, N.N.; et al. A systematic review of multi-factor authentication in digital payment systems: NIST standards alignment and industry implementation analysis. J. Syst. Arch. 2025, 162, 103402. [Google Scholar] [CrossRef]
  22. Krishnaprabha, R. Secure multi-factor authentication and digital identity management using twisted group ring-based cryptography. Int. J. Inf. Technol. 2025, 1, 1–15. [Google Scholar] [CrossRef]
  23. Sun, N.; Liu, Y.; Zhang, Y.; Liu, Y. Decoupling Online Ride-Hailing Services: A Privacy Protection Scheme Based on Decentralized Identity. Electronics 2024, 13, 4060. [Google Scholar] [CrossRef]
  24. AlJanah, S.; Zhang, N.; Tay, S.W. Optimizing Group Multi-Factor Authentication for Secure and Efficient IoT Device Communications. Cryptography 2025, 9, 35. [Google Scholar] [CrossRef]
  25. Manowska, A.; Boros, M.; Hassan, M.W.; Bluszcz, A.; Tobór-Osadnik, K. A Modern Approach to Securing Critical Infrastructure in Energy Transmission Networks: Integration of Cryptographic Mechanisms and Biometric Data. Electronics 2024, 13, 2849. [Google Scholar] [CrossRef]
  26. Chen, T.-H.; Huang, J.-C. A novel user-participating authentication scheme. J. Syst. Softw. 2010, 83, 861–867. [Google Scholar] [CrossRef]
  27. Sain, M.; Kim, K.-H.; Kang, Y.-J.; Lee, H.J. An Improved Two Factor User Authentication Framework Based on CAPTCHA and Visual Secret Sharing. In The 22nd IEEE International Conference on Computational Science and Engineering, the 17th IEEE International Conference on Embedded and Ubiquitous Computing CSE/EUC 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 171–175. [Google Scholar]
  28. Wilkinson, D. SMS or Email for Two-Factor Authentication? SimpleTexting. Available online: https://simpletexting.com/blog/sms-vs-email-2fa/ (accessed on 28 December 2023).
  29. Gill, A. Using Geo-Location Data in the Authentication Process. CURITY. Available online: https://curity.io/resources/learn/geolocation-overview/ (accessed on 28 December 2023).
  30. Doctro, K. Introduction to Cyber Security: Stay Safe Online. The Open University|OpenLearn. Available online: https://www.open.edu/openlearn/mod/oucontent/view.php?id=48261 (accessed on 28 December 2023).
  31. David Kopack, B.S. Secure QR Code Authentication, Version 1.0; OASIS Open: Woburn, MA, USA, 2022; Volume 1, 1–25. Available online: https://docs.oasis-open.org/esat/sqrap/v1.0/csd01/sqrap-v1.0-csd01.html (accessed on 20 March 2023).
  32. Okazaki, S.; Li, H.; Hirose, M. Benchmarking the Use of QR Code in Mobile Promotion. J. Advert. Res. 2012, 52, 102–117. [Google Scholar] [CrossRef]
  33. Chang, J.H. An introduction to using QR codes in scholarly journals. Sci. Ed. 2014, 1, 113–117. [Google Scholar] [CrossRef]
  34. Chow, Y.-W.; Susilo, W.; Wang, J.; Buckland, R.; Baek, J.; Kim, J.; Li, N. Utilizing QR codes to verify the visual fidelity of image datasets for machine learning. J. Netw. Comput. Appl. 2021, 173, 102834. [Google Scholar] [CrossRef]
  35. Tirfe, D.; Anand, V.K. A Survey on Trends of Two-Factor Authentication. Lect. Notes Netw. Syst. 2022, 281, 285–296. [Google Scholar] [CrossRef]
  36. AlQahtani, A.A.S.; Alamleh, H.; Gourd, J. BF2FA: Beacon Frame Two-factor Authentication. In Proceedings of the 2020 IEEE International Conference on Communication, Networks and Satellite (Comnetsat), Batam, Indonesia, 17–18 December 2020; pp. 357–361. [Google Scholar]
  37. Shirvanian, M.; Agrawal, S. 2D-2FA: A New Dimension in Two-Factor Authentication. In ACSAC ’21: Proceedings of the 37th Annual Computer Security Applications Conference; Association for Computing Machinery: New York, NY, USA, 2021; pp. 482–496. [Google Scholar] [CrossRef]
  38. von Ahn, L.; Blum, M.; Hopper, N.J.; Langford, J. CAPTCHA: Using Hard AI Problems for Security. In Advances in Cryptology—EUROCRYPT 2003, International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2003; pp. 294–311. [Google Scholar] [CrossRef]
  39. Aloul, F.; Zahidi, S.; El-Hajj, W. Two Factor Authentication Using Mobile Phones. In Proceedings of the IEEE/ACS International Conference on Computer Systems and Applications, AICCSA 2009, Rabat, Morocco, 10–13 May 2009; pp. 641–644. [Google Scholar] [CrossRef]
  40. Erdem, E.; Sandikkaya, M.T. OTPaaS—One Time Password as a Service. IEEE Trans. Inf. Forensics Secur. 2019, 14, 743–756. [Google Scholar] [CrossRef]
  41. Collin Mulliner, J.-P.S.; Borgaonkar, R.; Stewin, P.; Seifert, P. SMS-based one-time passwords: Attacks and defense. In Detection of Intrusions and Malware, and Vulnerability Assessment: 10th International Conference, DIMVA 2013, Berlin, Germany, 18–19 July 2013; Association for Computing Machinery: New York, NY, USA, 2013; pp. 150–159. [Google Scholar] [CrossRef]
  42. Putra, D.S.K.; Sadikin, M.A.; Windarta, S. S-Mbank: Secure Mobile Banking Authentication Scheme Using Signcryption, Pair Based Text Authentication, and Contactless Smartcard Susila Windarta. In Proceedings of the 2017 15th International Conference on Quality in Research (QiR): International Symposium on Electrical and Computer Engineering; IEEE Inc.: Piscataway, NJ, USA, 2017; pp. 230–234. [Google Scholar] [CrossRef]
  43. Hedberg, T.D.; Krima, S.; Camelio, J.A. Embedding X.509 Digital Certificates in Three-Dimensional Models for Authentication, Authorization, and Traceability of Product Data. J. Comput. Inf. Sci. Eng. 2017, 17, 011008. [Google Scholar] [CrossRef] [PubMed]
  44. Rodrigues, B.; Chaudhari, A.; More, S. Two factor verification using QR-code: A unique authentication system for Android smartphone users. In Proceedings of the 2016 2nd International Conference on Contemporary Computing and Informatics, IC3I 2016; Institute of Electrical and Electronics Engineers Inc.: Piscataway, NJ, USA, 2016; pp. 457–462. [Google Scholar] [CrossRef]
  45. Fu, Z.; Cheng, Y.; Liu, S.; Yu, B. A new two-level information protection scheme based on visual cryptography and QR code with multiple decryptions. Measurement 2019, 141, 267–276. [Google Scholar] [CrossRef]
  46. Mathivanan, P.; Balaji Ganesh, A. QR code based color image stego-crypto technique using dynamic bit replacement and logistic map. Optik 2021, 225, 165838. [Google Scholar] [CrossRef]
  47. Yang, J.; Peng, H.; Liu, L.; Lu, L. 3D printed perforated QR codes. Comput. Graph. 2019, 81, 117–124. [Google Scholar] [CrossRef]
  48. Yang, J.; Zhang, Y.; Lanting, C.J.M. Exploring the Impact of QR Codes in Authentication Protection: A Study Based on PMT and TPB. Wirel. Pers. Commun. 2017, 96, 5315–5334. [Google Scholar] [CrossRef]
  49. Aciobanitei, I.; Buhus, I.C.; Pura, M.-L. Using Cryptography in the Cloud for Lightweight Authentication Protocols Based on QR Codes. In SACI 2018—IEEE 12th International Symposium on Applied Computational Intelligence and Informatics, Proceedings, 17–19 May 2018, Timisoara, Romania; IEEE Inc.: Piscataway, NJ, USA, 2018; pp. 539–542. [Google Scholar] [CrossRef]
  50. Hicks, C.; Mavroudis, V.; Crowcroft, J. SIMple ID: QR Codes for Authentication Using Basic Mobile Phones in Developing Countries. In Security and Trust Management; STM 2022. Lecture Notes in Computer Science; Lenzini, G., Meng, W., Eds.; Springer Science and Business Media Deutschland GmbH: Berlin/Heidelberg, Germany, 2023; pp. 3–23. [Google Scholar] [CrossRef]
  51. Alam, N.; Sagar, A.S.M.S.; Zhang, W.; Jin, T.; Dosset, A.; Dang, L.M.; Moon, H. A comprehensive study on enhanced QR extraction techniques with deep learning-based verification. Appl. Intell. 2025, 55, 676. [Google Scholar] [CrossRef]
  52. Wang, R.; Huang, L.; Madden, K.; Wang, C. Enhancing QR Code System Security by Verifying the Scanner’s Gripping Hand Biometric. In WiSec ’24: Proceedings of the 17th ACM Conference on Security and Privacy in Wireless and Mobile Networks; Association for Computing Machinery: New York, NY, USA, 2024; pp. 42–53. [Google Scholar] [CrossRef]
  53. Li, C.; Jin, Z.; Wang, F.; Zhang, Z.; Liu, B.; Guo, Y. A Novel QR Code-Based Solution for Secure Electronic Health Record Transfer in VTE Home Rehabilitation Management: The QRST-AB algorithm (Preprint). JMIR Rehabil. Assist. Technol. 2025, 12, e69230. [Google Scholar] [CrossRef]
  54. Kuligowska, K.; Huć, A. Innovative QR code-based product authenticity safeguards: Case study of design considerations and technological challenges. Humanit. Soc. Sci. Rev. 2024, 12, 72–80. [Google Scholar] [CrossRef]
  55. Husni, I.; Al Amin, I.H.; Lusiana, V.; Hartono, B.; Wahyu, D. QR Code-Based Attendance System for Contact Tracking Post-Pandemic. CogITo Smart J. 2024, 10, 15–29. [Google Scholar] [CrossRef]
  56. Alsuhibany, S.A. Innovative QR Code System for Tamper-Proof Generation and Fraud-Resistant Verification. Sensors 2025, 25, 3855. [Google Scholar] [CrossRef] [PubMed]
  57. Silva, L.; Pimentel, B.; Duarte, B.; Escarpini, R.; Sousa, L.; Cruz, N.; Silva, R. Accessibility by Design: A Systematic Review of Inclusive E-Book Standards, Tools, and Practices. Sustainability 2025, 17, 11173. [Google Scholar] [CrossRef]
Figure 1. Framework for geometric patterns integration in QR codes.
Figure 1. Framework for geometric patterns integration in QR codes.
Symmetry 18 00069 g001
Figure 2. QR code authentication system architecture diagram.
Figure 2. QR code authentication system architecture diagram.
Symmetry 18 00069 g002
Figure 3. QR code authentication process. (a) QR code with embedded question related to number of shapes; (b) required text on mobile phone; and (c) options for selecting number of shapes from 1 to 5.
Figure 3. QR code authentication process. (a) QR code with embedded question related to number of shapes; (b) required text on mobile phone; and (c) options for selecting number of shapes from 1 to 5.
Symmetry 18 00069 g003
Figure 4. Preferred outline widths for black colors (20 participants).
Figure 4. Preferred outline widths for black colors (20 participants).
Symmetry 18 00069 g004
Figure 5. Preferred outline widths for white colors (20 participants).
Figure 5. Preferred outline widths for white colors (20 participants).
Symmetry 18 00069 g005
Figure 6. Best outline widths for black color circles and triangles ranging from 2 to 4 for three different orientations.
Figure 6. Best outline widths for black color circles and triangles ranging from 2 to 4 for three different orientations.
Symmetry 18 00069 g006
Figure 7. Best outline widths for black color squares ranging from 3 to 5 for three different orientations.
Figure 7. Best outline widths for black color squares ranging from 3 to 5 for three different orientations.
Symmetry 18 00069 g007
Figure 8. Best outline widths for white color circle, square, and triangles ranging from 3 to 5 for three different orientations.
Figure 8. Best outline widths for white color circle, square, and triangles ranging from 3 to 5 for three different orientations.
Symmetry 18 00069 g008
Figure 9. Multiple similar shapes of black and white colors with best outline widths.
Figure 9. Multiple similar shapes of black and white colors with best outline widths.
Symmetry 18 00069 g009
Figure 10. Multiple mixed shapes of black and white colors with best outline widths.
Figure 10. Multiple mixed shapes of black and white colors with best outline widths.
Symmetry 18 00069 g010
Table 1. Overview of multi-factor authentication approaches and their characteristics.
Table 1. Overview of multi-factor authentication approaches and their characteristics.
ReferenceMethodBenefitsDrawbacksCostEfficiencyApplications
[35]OTP, Biometrics, Digital CertificatesStrong security, prevents data breachesVulnerable to phishing, man-in-the-middle attacks, weak credentialsModerateHighSecure login, access control
[36]RSSI for Location-Based AuthenticationStrong security, uses existing infrastructure, non-intrusiveRequires multiple hardware, Wi-Fi dependent, privacy concernsHighModerateLocation-sensitive access control
[37]2D-2FA with High-Entropy PINEnhanced security, user engagement, automated PIN transmissionRequires additional devices, synchronization issues, network dependencyModerateHighSecure online transactions
[38]CAPTCHA for User VerificationEffective bot detection, dual-layer verification, cognitive challengeTime-consuming, prone to errors, by-passable by AI tools, scalability issuesLowModerateWeb-based authentication
[39]Mobile Phones as Software Tokens (OTPs)Familiar to users, backup via SMS, effective for short durationsPhone dependency, theft/loss risks, battery/connectivity issuesLowHighOnline banking, ATM transactions
[40]Cloud-Based OTPNo SMS dependency, faster, integrates with cloud servicesInternet dependency, cloud service vulnerabilities, software requirementsModerateHighCloud-based systems, enterprise access
[41]SMS-Based OTPWorks on all phones, no internet neededSIM swapping, cellular coverage issues, SMS interception risksLowModerateGeneral-purpose 2FA
[42]Contactless Smart Card with PINSecure against SMS vulnerabilities, mutual authenticationSpecialized hardware required, theft/loss of card, high costHighHighMobile banking, secure enterprise access
[43]Embedding X.509 Certificates in 3D ModelsEnhances trust, authentication, and traceability of product dataLimited adoption, implementation challengesModerateHighAerospace, PLM workflows
[44]QR Code with Encrypted IMEIResistant to phishing, secure matching of device identifiersRequires device compatibility, QR code decoding issuesModerateHighDevice-based authentication
[45]QR Code with Visual CryptographyDual-layer protection, enhanced decryption techniquesComputational complexity, hardware dependencyHighModerateData security, secure communications
[46]QR Code for Multi-Level SecurityHigh robustness, data embedding, encryptionHigh processing power required, decoding challengesModerateHighDigital watermarking, secure communication
[47]3D Printable QR CodeLow visual alteration, high decoding robustnessRequires 3D printing infrastructure, design complexityHighModerate3D modeling, secure physical tagging
[49]QR Code-Based Authentication with Cloud CryptographyIncreases security, reduces smartphone computational loadRequires reliable internet and cloud infrastructureModerateHighAuthentication systems
[50]Extending SIM Card Standards to Generate QR Codes for AuthenticationSecure, biometrics-free, and privacy-preservingLimited to feature phones, dependent on SIM card infrastructureLowModerateFoundational eID systems
Proposed MethodQR Codes with Geometrical ShapesEnhances security and usability, resistant to phishing and man-in-the-middle attacks, faster recognition, seamless integrationPotential challenges with QR code readability and implementation complexityLow to ModerateHighSecure authentication systems
Table 2. User’s perception survey details.
Table 2. User’s perception survey details.
Outline WidthShapesColorsPositionsUsersUser’s Perception
1–5Square, Circle, TriangleBlack, White3Male = 10
Female = 10
Clarity, Visual Esthetics, Usability
Table 3. Scanning test requirements.
Table 3. Scanning test requirements.
Screen DetailsMobile UsedDistance (cm)Lighting
1920 × 1080, 60 Hz, RGB coloriPhone 14 ProMax, Samsung S23, and Asus ROG phone 710, 50 and 100Low, Medium, and Bright
Table 4. Statistical results for black shapes.
Table 4. Statistical results for black shapes.
StatisticCircleTriangleSquare
Count20.020.020.0
Mean2.92.84.2
Std0.85220.69590.8944
Min2.02.03.0
25%2.02.03.0
50%3.03.04.5
75%4.03.05.0
Max4.04.05.0
Table 5. Statistical results for white shapes.
Table 5. Statistical results for white shapes.
StatisticCircleTriangleSquare
Count20.020.020.0
Mean4.04.14.1
Std0.91770.71820.9119
Min3.03.03.0
25%3.04.03.0
50%4.04.04.0
75%5.05.05.0
Max5.05.05.0
Table 6. Optimal outline widths for QR code shapes by color and conditions.
Table 6. Optimal outline widths for QR code shapes by color and conditions.
ShapeColorOutline WidthOptimal Conditions
CircleBlack2–4All lighting conditions
TriangleBlack2–3All distances
SquareBlack4 and 5Medium-light, central placement preferred
CricleWhite3–5High contrast required in bright lighting
TriangleWhite4 and 5High contrast required in bright lighting
SquareWhite4 and 5High contrast required in bright lighting
Table 7. Comparative analysis of two-factor authentication approaches.
Table 7. Comparative analysis of two-factor authentication approaches.
2FA MethodAuthentication Time (s)Deployment CostUser ConvenienceOffline CapabilitySecurity Level
SMS-based OTP12.5 ± 3.2Low initial/High per-userMediumNoMedium
Email OTP10.2 ± 2.9LowMediumNoMedium
Hardware Tokens8.1 ± 2.1HighLowYesHigh
Biometric6.4 ± 1.8HighHighYesHigh
TOTP Apps5.3 ± 1.4MediumHighLimitedHigh
QR Code-based (Proposed)3.2 ± 0.8LowVery HighYesHigh
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Abbas, M.; Wang, R.-Z. A Novel Two-Factor Authentication Scheme Based on QR Code Prompt. Symmetry 2026, 18, 69. https://doi.org/10.3390/sym18010069

AMA Style

Abbas M, Wang R-Z. A Novel Two-Factor Authentication Scheme Based on QR Code Prompt. Symmetry. 2026; 18(1):69. https://doi.org/10.3390/sym18010069

Chicago/Turabian Style

Abbas, Maisam, and Ran-Zan Wang. 2026. "A Novel Two-Factor Authentication Scheme Based on QR Code Prompt" Symmetry 18, no. 1: 69. https://doi.org/10.3390/sym18010069

APA Style

Abbas, M., & Wang, R.-Z. (2026). A Novel Two-Factor Authentication Scheme Based on QR Code Prompt. Symmetry, 18(1), 69. https://doi.org/10.3390/sym18010069

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop