Digital watermarking technology is used extensively in the field of digital rights management. However, there are a few problems when it comes to making effective use of digital watermarking. First, for conventional digital watermarking, a digital image is used only as a carrier for embedded watermarking information, and as this information may be diverted to other images, the watermark information needs to be generated based on the original image. Second, after the original image is modified/edited, the watermark information needs to prove that it is from the original image. Third, multiple digital watermarks need to be stored and managed without depending on trusted third parties. In an earlier work, we proposed a digital rights management system based on digital watermarking, blockchain, and perceptual hashing to resolve these issues. However, because we used conventional perceptual hashing, we could not draw sufficient conclusions about the first and second problems. In order to obtain a stable digest message of an image for digital watermarking, we here propose a new construction method for perceptual hashing using a convolutional neural network (CNN). In the proposed method, we first construct a machine-learned CNN for accepting an image that we want to take the perceptual hash value. The perceptual hash value is the cryptographic hash value of the weights that make up the CNN. We then verify that the reconstructed CNN can guarantee the hash value used when obtaining the hash value, and confirm that the image to be verified is accepted and is the perceptual hash value of this image.