  We introduce iQSync, a clock offset recovery method designed for
implementation on low-level hardware, such as FPGAs or microcontrollers, for
quantum key distribution (QKD). iQSync requires minimal memory, only a simple
instruction set (e.g. no floating-point operations), and can be evaluated with
sublinear time complexity, typically involving no more than a few thousand
iterations of a simple loop. Furthermore, iQSync allows for a precise clock
offset recovery within few seconds, even for large offsets, and is well suited
for scenarios with high channel loss and low signal-to-noise ratio,
irrespective of the prepare-and-measure QKD protocol used. We implemented the
method on our QKD platform, demonstrating its performance and conformity with
analytically derived success probabilities for channel attenuations exceeding
70 dB.
