Block cipher is a widely used encryption method. In order to improve the security of information in the network data encryption systems, the initial key should be guaranteed to be large enough. In order to overcome the threat of quantum computer to short initial keys, a key scheme based on chaotic map is proposed. The chaotic map is introduced into the original SM4 key scheme, which effectively increases the initial key space and greatly improves the resistance to key scheme attacks.#br#Due to the limited logic resources in hardware implementation, a logistic map is chosen as a chaotic system in this paper. Although the logistic map has many excellent properties of chaotic system, such as initial value sensitivity, randomness, ergodic, etc, there are still a lot of problems that we need to pay attention to. The parameter μ is the system parameter in the logistic map. The value of μ controls chaotic characteristics in the logistic map. When μ is equal to 4, the dynamic characteristics of logistic map are best. The values of data transmitted in the network are all quantified as 0 and 1. In order to implement the logistic map in a digital circuit, the digital quantization is needed. The bit sequence design quantization is very simple and saves resource consumption. Compared with other quantization methods, bit sequence design quantization can be implemented in hardware parallelly. United States National Institute of Standards and Technology launched the test program package to test the random numbers. The test program package includes frequency detection, block frequency detection, run test, etc. Those tests are used to detect the randomness in binary sequence of arbitrary length. The test program package proves that the sequence generated by the logistic map has a great randomness characteristic. After the security analysis of logistic map, the hardware implementation of logistic map is carried out in this paper. Based on the theoretical analysis and hardware implementation in the logistic map, a new SM4 key scheme combined with the logistic map is proposed. The proposed key scheme has less hardware resource consumption, larger key space and higher security than other key schemes combined with chaotic systems. The output of key scheme in this paper is tested by the test program package. The results show that the random number produced by new key scheme is larger. In the end, a key scheme attack is introduced in this paper. It is proved that the new key scheme in this paper can effectively resist existing key scheme attacks.