Chaos based image encryption algorithm is a research hotspot in multimedia security area. In this paper, a hyper-chaos based image encryption algorithm is proposed. Firstly, a new hyper-chaotic system is constructed and its dynamic characteristics are analyzed. The proposed hyper-chaotic system has bigger Lyapunov exponent than many classical hyperchaotic systems. Then this system is used to generate key-streams to permute and substitute the image pixels. In the encryption algorithm, a dynamic S-box is constructed to get good confusion effect. This S-box is based on the inverse operation in the algebraic structure Z 257 . Moreover, this inverse operation is embedded into an affine transformation to complicate the algebraic expression of the S-box and improve its security. The analysis results show that the proposed algorithm performs well.