  In the cryptographic context, an earlier unexplored application of the
temporal version of the Bell-type inequality is shown here in the
device-independent (DI) scenario. This is done by using the Leggett-Garg
inequality (LGI) to demonstrate the security against eavesdropping in a quantum
key distribution (QKD) scheme. This typically involves a higher dimensional
attack against which the standard BB84 protocol is insecure. For this purpose,
we invoke an appropriate form of LGI. While the key generation is done by the
usual Bennett-Brassard 1984 (BB84) method, the security check against device
attacks is provided by testing for the violation of the particular form of LGI
used here.
