Zero-power communication, enabled by energy harvesting, backscattering, and low-power computing, is capable of fulfilling the requirements of emerging Internet of Things (IoT) communication scenarios that demand low cost, compact size, and minimal power consumption. Thus, it holds great potential as a transformative technology for the future of IoT. Trusted access and secure transmission remain essential in zero-power communication scenarios. Nevertheless, conventional complex security mechanisms become impractical due to limited power consumption and resources. This work presents a lightweight security protocol for authentication. Initially, a sliding window algorithm, utilizing the Hamming distance, is designed to generate the message digest. This algorithm leverages the remaining electric quantity of the transmitter as a secret parameter for authentication. Subsequently, a key distribution function based on the hash chain is employed to ensure the security of the session key. The protocol's security attributes regarding transmitted data and its ability to withstand common attacks are demonstrated through formal security analysis and the utilization of the ProVerif analysis tool. Extensive simulations validate the efficacy of the proposed security algorithms, which are well suited for lightweight IoT devices with severely constrained resources and outperform benchmark algorithms.