The invention discloses a grayscale image visual encryption method. In this method, the two processes of image generation and superposition decoding in visual cryptography are placed in an error diffusion feedback loop. That is to say, at the encoder side, each pixel or image block is sequentially processed according to a certain scanning order, and for each pixel or image block on the generated shared image, the superimposed decoding effect is checked immediately, and the superimposed obtained The reconstructed target image is compared with the original secret image to obtain the difference between the two, and the contrast difference is fed back and diffused to surrounding pixels or image blocks that have not been quantified, so as to improve the quality of the decoded and reconstructed secret image. The process of generating shared images, and the synthesis process corresponds to the process of obtaining target images from shared images, the method of the present invention puts synthesis in analysis, that is, analysis based on synthesis.