Security and privacy of data are important factors in the Internet of Things (IoT), which enables safe communication with emerging objects. The non-standardization of security protocols on the internet of things makes them vulnerable to intruders and compromises the process of communication. Conventional cryptography approaches face certain limitations in the generation of keys for authentication and authorization of communication systems. The limitations of the cryptography approach are explored in terms of computational overhead and hardware requirements. Singal processing is an alternative cryptography approach for key generation in physical-layer wireless communication systems. The wireless channel's reciprocity principle is used to generate keys. The important factor in signal-based key generation is the process of quantization. In this manuscript, we propose modified discrete wavelet transform (DWT) methods for key generation in IoT. The modification of discrete wavelet transform methods encapsulates the process of common spatial patterning (CSP). The CSP is another signal processing method for the formation of signal patterns. The proposed method reduces DWT discrepancies and yields a key generation technique that is efficient. Key generation processing used multi-bit quantization to quantify the product of the modified discrete wavelet transform. The proposed algorithm for key generation simulates different numbers of device nodes in indoor and outdoor scenarios. Use MATLAB tools to simulate the process and measure standard parameters such as AKL and KDR. According to the results, the suggested technique outperforms existing key generation algorithms by 3%.