  The fabrication of quantum key distribution (QKD) systems typically involves
several parties, thus providing Eve with multiple opportunities to meddle with
the devices. As a consequence, conventional hardware and/or software hacking
attacks pose natural threats to the security of practical QKD. Fortunately, if
the number of corrupted devices is limited, the security can be restored by
using redundant apparatuses. Here, we report on the demonstration of a secure
QKD setup with optical devices and classical post-processing units possibly
controlled by an eavesdropper. We implement a 1.25 GHz chip-based
measurement-device-independent QKD system secure against malicious devices on
\emph{both} the measurement and the users' sides. The secret key rate reaches
137 bps over a 24 dB channel loss. Our setup, benefiting from high clock rate,
miniaturized transmitters and a cost-effective structure, provides a promising
solution for widespread applications requiring uncompromising communication
security.
