  Semi-device-independent quantum protocols realize information tasks - e.g.
secure key distribution, random access coding, and randomness generation - in a
scenario where no assumption on the internal working of the devices used in the
protocol is made, except their dimension. These protocols offer two main
advantages: first, their implementation is often less demanding than
fully-device-independent protocols. Second, they are more secure than their
device-dependent counterparts. Their classical analogous is represented by
random access codes, which provide a general framework for describing one-sided
classical communication tasks. We discuss conditions under which detection
inefficiencies can be exploited by a malicious provider to fake the performance
of semi-device-independent quantum and classical protocols - and how to prevent
it.
