Image 能否在不丢失exif数据的情况下加密PNG?

Image 能否在不丢失exif数据的情况下加密PNG?,image,encryption,steganography,Image,Encryption,Steganography,我一直在研究这个Reddit难题: 而且,该线程中的大多数用户都被难住了。完全公开,我很想赢得这个奖项,但是通过引起人们的注意并寻求帮助,我知道我减少了我的机会,但在这一点上,我更想知道图片上说的是什么 我们将密码缩小为包含PNG exif数据的文本文件的URL,但当作为PNG打开时,它被破坏了。该PNG是否可以加密或故意破坏,以保存exif数据?最好的方法是什么?请注意,数字字符串和“AK”明确地链接到这条线索,因此我只能假设可能涉及到一个异步密钥,或者是由Arjen Kampf Lenst

我一直在研究这个Reddit难题:

而且,该线程中的大多数用户都被难住了。完全公开,我很想赢得这个奖项,但是通过引起人们的注意并寻求帮助,我知道我减少了我的机会,但在这一点上,我更想知道图片上说的是什么


我们将密码缩小为包含PNG exif数据的文本文件的URL,但当作为PNG打开时,它被破坏了。该PNG是否可以加密或故意破坏,以保存exif数据?最好的方法是什么?请注意,数字字符串和“AK”明确地链接到这条线索,因此我只能假设可能涉及到一个异步密钥,或者是由Arjen Kampf Lenstra或某个愤怒的孩子首创的标准。当然,使用ImageMagick如下:

# Look at rose image before we start, and its header
identify -verbose rose.jpg

现在将注释添加到图像中,并将其加密为
encrypted.png

convert -comment "Freddy frog" rose.jpg -encipher passphrase.txt encrypted.png
检查加密图像的标题,查看其中是否可见EXIF数据、注释和其他数据-是,它们是:

identify -verbose encrypted.png

Image: encrypted.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 3220
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 126.755 (0.497077)
      standard deviation: 73.7824 (0.289343)
      kurtosis: -1.18047
      skewness: 0.0142557
      entropy: 0.99254
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 127.937 (0.501712)
      standard deviation: 75.0501 (0.294314)
      kurtosis: -1.23185
      skewness: -0.0233363
      entropy: 0.992485
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 127.594 (0.500368)
      standard deviation: 74.64 (0.292706)
      kurtosis: -1.22352
      skewness: -0.0177342
      entropy: 0.992544
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 127.428 (0.499719)
      standard deviation: 74.4927 (0.292128)
      kurtosis: -1.21239
      skewness: -0.00900116
      entropy: 0.992523
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    cipher:mode: CTR
    cipher:nonce: d3d57ca43eacb27a9d72b65ef976923e5b761c7aaaee1d1914d1769ca4834488
    cipher:type: AES
    comment: Freddy frog                                      <--- comment is visible
    date:create: 2015-10-04T18:48:43+01:00
    date:modify: 2015-10-04T18:48:43+01:00
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 6 tEXt/zTXt/iTXt chunks were found
    signature: 273e3934027f6ffbcf00b3eca7eb0c576d8fd180e87133112ecacd59225986ee
  Artifacts:
    filename: encrypted.png
    verbose: true
  Tainted: False
  Filesize: 10.1KB
  Number pixels: 3.22K
  Pixels per second: 3.22EB
  User time: 0.000u
  Elapsed time: 0:01.000
  Version: ImageMagick 6.9.1-10 Q32 x86_64 2015-10-02 http://www.imagemagick.org

什么意思?它是如何加密的?加密是一种无丢失协议,加密不会导致数据丢失我知道,这是一个谜,图像已损坏,但当EXIF数据作为txt文件查看时,它仍然可见,所以我想知道发生了什么?我认为这是谜团的一部分
identify -verbose encrypted.png

Image: encrypted.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 3220
    Red:
      min: 0 (0)
      max: 255 (1)
      mean: 126.755 (0.497077)
      standard deviation: 73.7824 (0.289343)
      kurtosis: -1.18047
      skewness: 0.0142557
      entropy: 0.99254
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 127.937 (0.501712)
      standard deviation: 75.0501 (0.294314)
      kurtosis: -1.23185
      skewness: -0.0233363
      entropy: 0.992485
    Blue:
      min: 0 (0)
      max: 255 (1)
      mean: 127.594 (0.500368)
      standard deviation: 74.64 (0.292706)
      kurtosis: -1.22352
      skewness: -0.0177342
      entropy: 0.992544
  Image statistics:
    Overall:
      min: 0 (0)
      max: 255 (1)
      mean: 127.428 (0.499719)
      standard deviation: 74.4927 (0.292128)
      kurtosis: -1.21239
      skewness: -0.00900116
      entropy: 0.992523
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    cipher:mode: CTR
    cipher:nonce: d3d57ca43eacb27a9d72b65ef976923e5b761c7aaaee1d1914d1769ca4834488
    cipher:type: AES
    comment: Freddy frog                                      <--- comment is visible
    date:create: 2015-10-04T18:48:43+01:00
    date:modify: 2015-10-04T18:48:43+01:00
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 6 tEXt/zTXt/iTXt chunks were found
    signature: 273e3934027f6ffbcf00b3eca7eb0c576d8fd180e87133112ecacd59225986ee
  Artifacts:
    filename: encrypted.png
    verbose: true
  Tainted: False
  Filesize: 10.1KB
  Number pixels: 3.22K
  Pixels per second: 3.22EB
  User time: 0.000u
  Elapsed time: 0:01.000
  Version: ImageMagick 6.9.1-10 Q32 x86_64 2015-10-02 http://www.imagemagick.org
convert encrypted.png -decipher passphrase.txt decrypted.jpg