| Along with the constant development in computer science and communications technology, the Internet has come into people's lives. Network helps people to exchange information and at the same time promotes the development of science, culture and production. In short, Network improves the quality of people's life; but it also posed a great challenge for information security. In today's information age, a lot of sensitive information often transmitted through public computer networks or communication facilities, such as court records, case, transfer of funds and private property etc. And some characteristics of the above information are the people's urgent needs, such as confidentiality, integrity, prevention of counterfeiting and tampering. Cryptography is the core of the security and confidentiality of network and information. With the continuous improvement of computer performance, there will be a tremendous impact to the existing encryption system. Therefore the work of cryptography research and improvement is of great significance. This paper presents a dynamic encryptor based on the ergodic matrices over finite field.The design of the most previous encryption algorithms is based on the A.Kerckhoffs's assumptions. The assumption is that the security of the encryption system should not depend on the protection of the encryption algorithms, but should depend on the protection of the keys. If an encryption algorithm depends on the protection of the keys for encryption algorithm and the encryption algorithm itself, the safety performance of this encryption algorithm will be even better. The dynamic encryptor is designed based on this concept. Since it is impossible to provide full protection of static encryption algorithm, therefore the dynamic encryptor in this paper is based on the ideology of encryption algorithm for dynamic changes.The principle of dynamic encryptor is to choose a proper size of instruction space IS according to the key K\ from an instruction space approaching infinity, and then choose instructions dynamically in space IS to generate the instruction sequence EP. Finally, use the key K2 and the encrypt instructions in the EP to encrypt the message for block encryption. In order to realize the protection of encrypt algorithm, must choose the instructions in Real-Random.In this paper, we construct the dynamic encryptor based on the ergodic matrix over finite field. The ergodic matrix over Mn×nFq have a lot of good characteristics in cryptography, and the number of which is large. At the same time all the ergodic matrixes are reversible. We can use them convenient for encryption and decryption. Thus, we can construct a vast instruction space using the ergodic matrix over finite field, then use the matrix in it for encryption. In order to achieve choosing the encrypt instruction in Real-Random: First produce a Real-Random sequence R using the Real-Random number generator, and then mix the message M with R so that the RRM is a Real-Random message; We choose a proper size of subset EISSET over the vast instruction space according to the key K1 then we use the randomness of RRM choose encrypt instruction in EISSET to construct the EP; Finally encryption RRM using K2 and EP. Because R is real random and can not be restored by analysis and prediction, so the attackers can not obtain the encrypt instructions. And the attackers do not know key K1, can't restore EISSET, he want to decrypt the ciphertext only through exhaustive method, then he will face the whole ergodic matrix space, making exhaustive attack can not be achieved. In addition, R is different in each encryption, even encrypt the same message with the same keys repeatedly, the ciphertext is different. It can effectively resist many common attack methods, such as Cipher Text-Only Attack, Known-Plaintext Attack, Chosen-Plaintext Attack and Chosen-Cipher Text Attack etc. As the key K1 and K2 have no restrictions on the length, which provides that K1 and K2 on the exhaustive attack can not be achieved. In the paper also discuss the system's security under the instance of one of the keys K1 and K2 was leaked, even if it happened, the security of the system remains good.Many security features of this dynamic encryptor depend on the quality of the real random sequence R, such as selecting encrypt instruction in Real-Random, making ciphertext randomness etc. Therefore, this paper also presents a method of constructing the real random number generator based on analyzing the environmental noise received by the microphone. Through the analysis in this paper, the environmental noise is a real random source; and it can be used to construct the real random number generator. And through the analysis of the simple noise source and the mutational sound intensity noise source, the real random number based on the environmental noise without any processing is really not feasible. So a method named 'Removal Extremes Binary Module' is presented in this paper, it can wipe off the negative factors which brought on the periodicity of the simple noise source and the chanciness of the mutation of the sound intensity. The idea of the algorithm is receiving environmental noise data from microphone, analyzing the data to get rid of the "extreme point" (In this paper use 8 bits to collect data, the extreme points is the point with amplitude of 0 or 255), and then calculating other points with the formula, amplitude%2, to obtain a random sequence posed by 1 and 0. This paper also carries out a security assessment of the random sequence using Chi-Square test, come to the conclusion that the random sequence generated by this algorithm has really a very good performance.As for the advantage of the dynamic encryptor, we put forward a practical way using the dynamic encryptor in high-intensity symmetric encryption, to exchange important information, identity verification. More applications need to be explored. Given the dynamic encryptor for outstanding safety performance, it will receive more attention. |