Customer using contactless credit card tap terminal for payment. (Photo by sondem on Shutterstock)
New system turns credit card swipes and taps into secure authentication method
In A Nutshell
- NFCGest turns NFC cards into gesture passcodes instead of relying only on PINs.
- The system recognizes nine gestures, including swipes, taps, and slides.
- User studies showed over 90% accuracy across different people and styles.
- Potential uses include safer payments, vending machines, and door access systems.
VANCOUVER — Researchers have developed a touchless password system that could let people authorize purchases by swiping their credit card up in the air, tapping twice, sliding horizontally, then swiping right. It’s a gesture combination much harder to observe or copy than traditional codes.
Near Field Communication technology appears in billions of devices worldwide, powering contactless payments, building access cards, and transit systems. But despite this ubiquity, NFC interactions remain limited to tapping. Payment terminals require touchscreens or keypads for any additional functions, like selecting tip amounts or entering security codes.
The new device, dubbed “NFCGest,” transforms ordinary payment terminals into gesture-recognition devices. The system distinguishes nine different hand movements by analyzing radio signals that credit cards and terminals already exchange during contactless transactions.
Bu Li and Robert Xiao from the University of British Columbia’s Department of Computer Science built the technology around a security gap: contactless payments remain vulnerable for lost or stolen cards. Adding a gesture-based authentication layer as a second factor could stop unauthorized users even if they possess the physical card.
Li and Xiao recognized untapped potential in the electromagnetic signals NFC devices produce. When someone moves a card near a reader, the magnetic field fluctuates in distinct patterns. These signals operate at 848 kHz, which the researchers captured using a custom high-speed converter built around a microcontroller.
Two signal channels, called in-phase and quadrature, create unique signatures on what researchers call an amplitude-phase plot. A swipe produces a different curve than a tap, which differs from a shake. Machine learning algorithms trained on these patterns can identify specific gestures.

Breaking the Symmetry Problem
Standard NFC antennas present a challenge: their radially symmetric magnetic fields mean a leftward swipe looks identical to a rightward swipe. Li and Xiao solved this by placing small copper coils at strategic locations around the terminal, deliberately distorting the field. This asymmetry enables the system to distinguish all four cardinal directions.
The coils measure 35mm by 8mm and 45mm by 15mm, with 10 turns of copper wire each. Testing showed these additions barely affect performance, reducing maximum sensing distance from 8.87 cm to 8.67 cm and decreasing signal strength by just 0.339 dB.
The researchers designed a nine-gesture vocabulary: four directional swipes (up, down, left, right) performed with the card held horizontally, a vertical swipe performed in mid-air, a slide along the terminal’s front face performed with the card held vertically, a center tap, a double-tap, and a horizontal rub.
A four-gesture passcode drawn from the nine possible movements offers 6,561 combinations. That’s slightly fewer than a PIN’s 10,000, but harder to guess by watching. Shoulder surfing, where thieves watch victims enter PINs, becomes more difficult when authentication involves three-dimensional card movements rather than button presses. A swipe up looks different from a swipe down only when the terminal’s asymmetric field is present, making the gestures context-dependent.
Testing With Real Credit Card Users
Ten participants, ages 22 to 32, tested the system by performing each gesture 40 times across four sessions. The study accommodated natural variation, accepting differences in speed and slight deviations from perfect alignment.
Results showed 94.3% accuracy when the system was trained on data from the same person and 91.8% accuracy for completely new users. This cross-participant performance demonstrates NFCGest can work across different interaction styles.
Double-tap and rub gestures showed the highest confusion rates because both produce multiple amplitude peaks in the signal. Fast swipes also sometimes confused the system. Participants occasionally triggered false positives on the tap-center gesture when holding cards at angles rather than horizontally.
Most participants responded positively when asked about using NFCGest for gesture passcodes, viewing the technique as an extra security layer requiring no additional hardware on their end. However, some found certain gestures awkward, particularly the vertical swipe and upward swipe. Some raised concerns about shoulder surfing, though the researchers argue that someone who finds a lost card is unlikely to have observed the owner’s gesture passcode. One participant suggested creating multiple gesture codes for different transaction types, such as groceries versus entertainment versus commuting.

Applications Beyond Fraud Prevention
In the researchers’ demonstration, a user taps their card to authenticate it normally, then the payment terminal requests a four-gesture PIN code for larger purchases as a second authentication factor. In their prototype, users navigated tip menus by swiping up and down and confirmed selections with a leftward swipe, all without touching potentially contaminated screens.
Vending machines could accept directional swipes for item selection and slide gestures for purchase confirmation. Door access systems without displays could request gesture PINs during unusual hours or let building administrators control unlock duration through specific sequences, using LED flash patterns for feedback.
The current prototype streams data to a computer for processing, but the computational requirements remain modest. The system could be fully integrated into the terminal’s firmware, or would require an additional microprocessor costing at most $20 per terminal.
The NFC terminal’s test pins provide only 4-bit converted signals because they’ve already undergone low-resolution analog-to-digital and digital-to-analog conversion, losing detail. Access to truly raw analog signals would improve performance.
Different NFC protocols in credit cards versus transit cards may have varying timing characteristics requiring adjustments. Each interference coil weakens the magnetic field slightly, potentially limiting how many directions could be distinguished using this approach.
Participants found the vertical swipe gesture difficult because it lacks physical guidance, and the upward swipe felt unnatural as it moves away from the user. Some suggested mounting terminals vertically instead of horizontally to make upward movements more comfortable.
NFCGest shows that existing terminals can support richer interactions, offering a potential path to more secure, touch-free authentication without forcing people to memorize more PINs or touch more screens.
Paper Summary
Methodology
The researchers used a PN532 NFC terminal configured to expose raw demodulated radio signals through auxiliary test pins. They built a custom sampling system using an STM32H747XI microcontroller with high-speed analog-to-digital converters running at 2 MHz sampling rate per channel with 14-bit resolution. Two copper interference coils (35mm × 8mm and 45mm × 15mm, each with 10 turns) were placed in 3D-printed housings above the terminal to break the symmetry of the magnetic field, enabling directional discrimination. The system processed in-phase and quadrature signals to compute amplitude and phase for each NFC transaction, producing characteristic curves on a two-dimensional plot. They extracted 14 features from these curves, including minimum and maximum amplitudes and phases, interaction length, signed enclosed area, and local peak counts. A Random Forest classifier with 20 decision trees and maximum depth of 15 was trained to recognize nine gestures: four directional swipes, vertical swipe, slide, tap center, double tap, and rub.
Results
Ten participants (6 females, 4 males, ages 22-32) each performed every gesture 40 times across four sessions, producing 3,600 total gesture instances. Leave-one-session-out validation showed 94.3% average accuracy across all participants. Leave-one-participant-out validation achieved 91.8% accuracy, demonstrating the system’s ability to generalize to new users. The most common confusions occurred between double-tap and rub gestures (both featuring multiple amplitude peaks) and between directional swipes performed at high speeds. Terminal sensitivity experiments showed the interference coils reduced maximum sensing distance from 8.87 cm to 8.67 cm and decreased signal strength by 0.339 dB. The system processes gestures in real time with a running window analysis every 50 milliseconds.
Limitations
The exposed test signals from the NFC terminal had already undergone low-resolution (4-bit) analog-to-digital and digital-to-analog conversion, causing information loss that required compensation through signal averaging. Different NFC protocols (credit cards, smartphones, transit cards) may have varying temporal characteristics requiring adjustments to signal segmentation. The interference coil approach weakens the magnetic field slightly with each coil added, potentially limiting scalability to finer directional sensing. Participants found the vertical swipe gesture difficult to perform consistently due to lack of physical guidance, and the swipe-up gesture felt unnatural as it moves away from the user. The current prototype requires external hardware for data processing, though the researchers note the algorithms are lightweight enough to run on terminal microprocessors. Some gestures like tap-center were confused when participants held cards at angles rather than horizontally.
Funding and Disclosures
This research was supported by the Natural Science and Engineering Research Council of Canada under Discovery Grant RGPIN2019-05624, by the Innovation for Defence Excellence and Security (IDEaS) program of the Department of National Defence, Canada, and by Rogers Communications Inc. under the Rogers-UBC Collaborative Research Grant: Augmented and Virtual Reality. No competing interests were disclosed.
Publication Details
Bu Li and Robert Xiao. 2025. NFCGest: Contactless Gestural Interactions with NFC Devices. In The 38th Annual ACM Symposium on User Interface Software and Technology (UIST ’25), September 28–October 01, 2025, Busan, Republic of Korea. ACM, New York, NY, USA, 11 pages. DOI: 10.1145/3746059.3747729







