In recent years, as cloud storage is developing very fast, the higher safety standard is needed. For the confidentiality of the data storage, we analyzed traditional encryption algorithms and proposed a mixed linear AES-ECC encryption algorithm which is suitable for cloud storage.AES is capable of dealing with large files while ECC achieves high efficiency in both encryption and decryption. AES-ECC encryption algorithm combines their advantages together. We analyzed the security of the algorithm from various angles and then we use different algorithms to encrypt and decrypt some types of files on Hadoop platform and compared the encryption and decryption time of the algorithms.The results show that the algorithm has significant advantages over the traditional encryption algorithms in cloud storage.