The invention relates to a picture file encryption and decryption method and a picture file encryption and decryption system based on a content-associated secret key. When in encryption, according to the importance of data with respect to file application, the original picture file is segmented into sensitive data and main body data, the sensitive data forms a secret key, the main body data is subjected to supplemental treatment to form a cryptograph, and the secrete key and the cryptograph are respectively transmitted via different ways, and then combined at a destination to revert to the original picture file when in decryption; when the original picture file is segmented, the segmentation operation of the picture file is performed in a file layer, and the segmentation operation is performed in pixels based on a pixel gray level value or the contour line of a monochromatic chromatic value. According to the new encryption mechanism based on the content-associated secret key provided by the invention, the secret key with large data volume can be used, and the encryption and decryption processes are basically performed on the client, thus the system load is not increased; the new encryption mechanism can improve the data safety of the cloud storage system, in particular enhancing the privacy of the user data.