Abstract:AES encryption algorithm has a good performance in the field of block cipher, but the traditional AES algorithm has the defect that the iterative cycle of S-box is short, the correlation between round keys and seed key is strong. In order to enhance the security of AES algorithm, the AES algorithm is improved by using a new affine transformation to generate a new S-box, and then using the square residual algorithm to generate the secret key stream sequence. The results show that the iterative cycle of the improved S-box is 256 on the GF (28) domain, and the keys used in each encryption and decryption operation is a different sequence of random key streams. It is concluded that the improved AES algorithm makes each group of plaintext encrypt with different keys, so that there is no correlation between the grouping ciphertext, which achieves the purpose of one-time encryption with a fixed key, thus it has improved the security of AES encryption algorithm.