Duty-Cycled Pre-Tap Sensing for Relay-Resistant Contactless Payments

A relay attack fools a contactless payment terminal by passing the card's genuine cryptographic answers through two radios connected over a long link, so the terminal believes a phone that is far away is actually present. One proposed defense has the phone and the terminal compare what their ambient sensors (pressure, light, magnetic field, sound) are seeing, on the logic that co-located devices see the same world. This defense breaks down under the payment industry's 500 ms transaction deadline. A large reproducibility study found that, inside that window, most sensors simply do not return data, and the best detector it tested still misclassified about one in ten transactions. Our proposal is to stop asking the phone to sense during the tap. Instead, the phone keeps a cheap background buffer of the seconds before the tap, sampled sparsely and at irregular times. Because the terminal is stationary and powered, it can record continuously. At tap time, the two sides compare their recent histories.

That design turns a deadline problem into a sparse-data problem: how few irregular, asynchronous sensor readings does the phone need to collect, and at what battery cost, before copresence becomes reliable? Machine learning methods built for irregularly sampled time series exist for exactly this kind of data. They have never been tested on proximity verification. The deliverable is an energy–security curve, meaning detection error at fixed false-acceptance rates as a function of the phone's sensing duty cycle, together with an honest answer to whether specialized irregular-time models beat a well-engineered simple classifier on that curve.

Core Claim

The reproducibility study by Markantonakis et al. (Using Ambient Sensors for Proximity and Relay Attack Detection in NFC Transactions) motivates this work. Under a strict 500 ms window, GPS, Bluetooth, and Wi-Fi polling failed more than 90% of the time. A CNN on magnetic, light, and motion streams reached an equal error rate (EER) of 0.246, and a Random Forest on pressure alone reached about 0.10. Both are far from the roughly 1-in-50,000 false-acceptance level that payment systems expect. The authors themselves name pre-emptive background recording as one way out.

We make that suggestion precise. We claim that a duty-cycled background buffer can approach the copresence accuracy of continuous background recording at a small fraction of its sensing energy. The buffer is a few seconds of readings taken at irregular, low-rate moments chosen per sensor. A model that represents time gaps and missingness explicitly should, we claim, close most of the remaining distance to continuous recording.

Two points distinguish this from the obvious combination of these fields. The obvious version would run a continuous-time network on the existing 500 ms snapshots. We think that version is mostly doomed, because no model can recover information from sensors that never answered. Here, sparsity is a resource the system designer chooses, not a failure to be patched. The second claim, that irregular-time models are the right tool, is stated so it can fail. If a gradient-boosted classifier with explicit missingness features matches them on the curve, the curve itself remains the contribution.

Research Program

The system has three parts.

The first is a phone-side sampler. It wakes each sensor according to a schedule parameterized by mean rate and timing jitter. It keeps a ring buffer of a few seconds of (timestamp, channel, value) tuples with no grid imposed. The terminal side records the same sensor types densely.

The second is a copresence scorer. It takes the phone's irregular buffer and the terminal's dense buffer, aligned on a shared clock, and outputs a same-place score. A weighting by recency is essential. A legitimate user walks up to the terminal, so the phone's context only converges to the terminal's in the final second or two, while a relay victim's context never converges at all. We expect elapsed-time decay of the kind in Temporal Belief Memory (Kim et al.) to matter here. That model discounts old observations toward a baseline as the time gap grows.

The third is a measurement harness. It reports error at fixed false-acceptance rates together with measured sensing energy on commodity Android phones.

For the scorer, we borrow three families of irregular-time-series methods and adapt them to a paired, two-device input.

The first family is continuous-time networks driven by controlled differential equations, as in the Continuous-time Autoencoder (Wi et al.). That model builds a continuous hidden trajectory from a spline through the observations. It reported strong imputation at up to 70% masking with about 0.02M parameters, against 12.64M for SAITS on the Stocks benchmark. The small size is attractive for on-phone inference, but its spline step may smooth over sharp transients such as a door opening, which is a known limitation.

The second family is token-mixing transformers for asynchronous channels, as in MTM (Zhong et al.). MTM passes information from observed channels to unobserved ones. It reported gains of up to 3.8% AUPRC on PhysioNet 2012 at 88% sparsity.

The third family is continuous-time attention, as in ContiFormer. All three were built for clinical or forecasting data with one stream per subject. We change the input to two streams, one sparse and one dense, and the output to a match decision. We also report uncertainty using the evidential approach of Continuous Time Evidential Distributions, so the scorer can abstain and request a fallback, such as entering a PIN, when the buffer is too thin.

Data comes from two sources. We will run a new collection at NFC terminals in environments matching those of Markantonakis et al. (lab, cafeteria, dining hall, library), recording dense phone and terminal streams for several seconds before each tap. Duty cycles are then simulated by subsampling those streams, which gives exact ground truth for the dense upper bound. We will also attempt the same subsampling protocol on the 95-hour Wi-Fi channel-measurement corpus of Next2You (Fomichev et al.). Channel state information is the per-subcarrier amplitude and phase a Wi-Fi chip measures, and Next2You used it for copresence with error below 4% on continuous frames. Whether that corpus is released is not stated in our file, so it is a secondary target.

Impostor pairs are built by pairing phone buffers with terminal buffers from different locations and times. This includes adjacent rooms that share heating and ventilation, which is the hard case where pressure is known to be uninformative.

Baselines

The naive reference point is the 500 ms in-tap pipeline of Markantonakis et al., which is a Random Forest on pressure. That paper reports an EER of about 0.10, and 0.246 for its multi-sensor CNN. We re-run it on our own collection so the comparison uses the same transactions. Beating it means a lower EER at equal tap latency, which every buffer-based method should achieve trivially. It is included to show the size of the shift, not as the real contest.

The strongest simple competitor is gradient-boosted trees on hand-built pair features computed over the same irregular buffer. For each channel, these features include differences of means and slopes, correlation over overlapping intervals, time since last sample, and a sample-count indicator. This is the design that won in PPGTransID (Liu et al.), where an XGBoost model over 21 pairwise features reached 95.5% balanced accuracy on 6-second wearable windows. It is the competitor most likely to embarrass deep sequence models on small data. It gets the same buffers, the same train/test split by participant and location, and the same hyperparameter search budget, measured in trials, as each neural model. The irregular-time models beat it only if they reach lower false-rejection rates at a fixed false-acceptance rate across a range of duty cycles, with non-overlapping participant-level bootstrap intervals.

The upper bound is continuous background recording at full sensor rate scored by the best model. It costs the most energy and tells us how much of the gap a sparse buffer closes. No result on Lacuna reports pre-tap buffered copresence accuracy, so this number must come from our own collection.

The key ablation feeds each irregular-time model the same readings with timestamps replaced by sequence position, as if the data were evenly spaced. A second ablation zero-fills missing channels instead of masking them. If either ablation costs nothing, explicit time and missingness modeling is not what drives the result.

Why not just…?

Why not just record continuously in the background? This is the real threat, and the dense upper bound measures it directly. If its energy cost turns out negligible on modern phones, the duty-cycle question becomes moot and the paper reduces to a buffering result. We will measure power draw per sensor on target handsets. No reported energy figure was found on Lacuna for ambient-sensor copresence, so we cannot argue this away in advance. Continuous recording also raises privacy objections that a sparse buffer partly reduces. We can only argue that point, not measure it.

Why not just use pressure, which already reached about 0.10 EER? Markantonakis et al. themselves conclude 0.10 is far from payment-grade. Pressure carries little information distinguishing rooms that share ventilation. Our adjacent-room impostor pairs test exactly this, and we will report the pressure-only scorer on the buffered data as well, because longer pressure histories may help more than richer models do.

Why not just extend the tap to several seconds? The 500 ms deadline is an industry constraint the defense must live within. The buffer achieves a longer observation span without lengthening the tap, so this alternative is dominated as long as the buffer is accurate.

Why not use hardware distance bounding (UWB)? Distance bounding times radio round trips to bound physical distance, and ultra-wideband (UWB) chips do this with sub-nanosecond precision. Nkrow et al. (Building ToF Resiliency Into UWB-Based Secure Distance Bounding) show that reflections and blocked line of sight inflate false rejection even with such chips, and many terminals and cards lack them. Our scorer is complementary rather than a replacement, and could serve as a second factor where UWB is absent.

Proposed Experiments

The central experiment sweeps the phone's mean sampling rate from continuous down to roughly one reading per second per sensor, with fixed and jittered schedules. For each model and each duty cycle we report EER and false-rejection rate at false-acceptance rates of 1e-2 and 1e-3, plotted against measured energy.

We will not claim results at 1-in-50,000. Certifying that rate requires on the order of hundreds of thousands of roughly independent impostor trials. Our cross-paired impostors are correlated within sessions, so we report the confidence floor our data actually supports.

Three checks decide the outcome.

First, we test whether the sparse buffer at a modest duty cycle recovers most of the dense bound's error reduction over the 500 ms baseline. If it does not, the core claim fails.

Second, we test whether irregular-time models beat the gradient-boosted feature baseline at matched tuning budget, and whether that advantage disappears under the even-spacing ablation. If the boosted baseline matches them, we report that and recommend it, since it is cheaper.

Third, we test generalization to held-out locations and to a moving-walk-up condition, where the recency weighting should matter most.

Finally, we run a mimicry test in which the attacker's proxy near the victim stands in a room chosen to match the terminal's pressure and light. This bounds how much of the measured gain survives an attacker who knows the scheme.