Wireless sensor networks (WSNs) have been widely used, most notably in real-time traffic monitoring and military sensing and tracking. However, WSN applications could suffer from threats and endanger the applications if the suitable security issues are not taken into consideration. As a result, user authentication is an important concern to protect data access from unauthorized users. This paper presents a lightweight mutual authentication protocol for WSN applications. Instead of traditionally using a hash function for data protection, one of the interesting aspects of this protocol is that, for the purpose of data protection but with a low computational cost, the proposed key encryption function only requires simple exclusive-<sc>or</sc> (<sc>xor</sc>) arithmetic operations. Moreover, the corresponding hardware architecture was implemented by using an Altera DE2 board, including an Altera Cyclone II field-programmable gate array (FPGA). Finally, the output waveforms from the FPGA were displayed on the 16702A logic analysis system for real-time verification.