Recent developments in quantum computing pose a significant threat to the asymmetric cryptography currently in use. Neural cryptography offers a potential alternative that is resistant to attacks of known quantum computer algorithms. The considered solution is lightweight and computationally efficient. If a quantum computer algorithm were successfully implemented, it could expose IoT sensors and smart grid components to a wide range of attack vectors. Given the lightweight nature of neural cryptography and the potential risks, neural cryptography could have potential applications in both IoT sensors and smart grid systems. This paper evaluates one of the suggested enhancements: the use of integer-valued input vectors that accelerate the synchronization of the Tree Parity Machine. This enhancement introduces a new parameter M that indicates the minimum and maximum values of input vector elements. This study evaluates the nonbinary version of the mutual learning algorithm in a simulated insecure environment. The results indicate that, while the Nonbinary Tree Parity Machine may involve some trade-offs between security and synchronization time, the speed improvement is more substantial than the decrease in security. The impact of this enhancement is particularly significant for smaller adjustments to parameter M.