Encipher / Decipher
Encipher / Decipher
Hello
How can i recognize an encipehered image ?
How can i recognize an encipehered image ?
Re: Encipher / Decipher
Two ways: 1) visually it appears as random data; 2) mathematically measure the randomness of the pixels (if its near random pixels it is most likely enciphered).How can i recognize an encipehered image ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Encipher / Decipher
Interesting. So how would one tell the difference between an enciphered image and one create with +noise in IM?
Re: Encipher / Decipher
A noisy image is generally not as random as an enciphered image. The noise is generally added or subtracted relative to the current pixel value. However, in rare cases it could be difficult or impossible to differentiate an image created with random noise from one that is enciphered.
Re: Encipher / Decipher
would it be possible to set a parameter in the Image structure, telling that the image is enciphered ?
Re: Encipher / Decipher
Sure we can set a property but the property will not be saved to most of the image formats since arbitrary metadata is not supported by most image formats. The properties are cipher:type, cipher:mode, and cipher:nonce.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Encipher / Decipher
For other following this discussion, You can see examples of enciphered images in IM Examples http://imagemagick.org/Usage/transform/#encipher
This includes some images and the pass-phrase used, so you can try to download and decipher them yourself.
WARNING: this is not considered stable, and as such requires a compile time configuration option. It also may still change, though that is starting to become less likely.
Please try out your encryption ideas and either mail them to me, or to the forum, so that I can test them myself, and add them to IM examples for others.
This includes some images and the pass-phrase used, so you can try to download and decipher them yourself.
WARNING: this is not considered stable, and as such requires a compile time configuration option. It also may still change, though that is starting to become less likely.
Please try out your encryption ideas and either mail them to me, or to the forum, so that I can test them myself, and add them to IM examples for others.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Encipher / Decipher
For other following this discussion, You can see examples of enciphered images in IM Examples http://imagemagick.org/Usage/transform/#encipher
This includes some images and the pass-phrase used, so you can try to download and decipher them yourself.
WARNING: this is not considered stable, and as such requires a compile time configuration option. It also may still change, though that is starting to become less likely.
Hey Anthony,
I'm told that -encipher/-decipher are now standard, so when you get a chance, you can remove the caveat from this page:
"The "-encipher" and "-decipher" operators was added to IM v6.3.8-6. However it is currently experimental and requires you to include a "--enable-cipher" option during the build configuration. "
Rick
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Encipher / Decipher
Actually you probably would not want an image marked as being enciphered in any case! That is just asking for trouble!!!magick wrote:Sure we can set a property but the property will not be saved to most of the image formats since arbitrary metadata is not supported by most image formats. The properties are cipher:type, cipher:mode, and cipher:nonce.
I mean you may want to bury your encrypted image in amongst may other encrypted messages or even dummy encrypted images, so as to provide plusable deny ability with regards to 'rubber hose' attacks. EG if torture or legal presures are put to bear you can give the password for the dummy images and say the others are just random 'chaff'. That is useless if the chaff, and encrypted messages are distinguishable from each other.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Encipher / Decipher
checking...rmabry wrote:I'm told that -encipher/-decipher are now standard, so when you get a chance, you can remove the caveat from this page:
"The "-encipher" and "-decipher" operators was added to IM v6.3.8-6. However it is currently experimental and requires you to include a "--enable-cipher" option during the build configuration. "
Yeap it does appear that "--enable-cipher" is no longer needed.
Do you know what version of IM that changed?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Encipher / Decipher
Nope, better ask the boss.anthony wrote: Yeap it does appear that "--enable-cipher" is no longer needed.
Do you know what version of IM that changed?
By the way, it's amusing what happens when you use -decipher on an unenciphered image. Not unexpected, of course, since there is no -enciphered flag.
Well, the result is perhaps somewhat kinda just a little unexpected (to me):
convert rose: rose.png
convert logo: -decipher rose.png logojunk.png
But this is ImageMagick 6.4.5 2008-10-24 Q16 on Windows, so I don't know what to expect with 6.8.0.
Time to upgrade again...
Rick
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Encipher / Decipher
Cristy reports that it will mow treat an image as a binary string including null characters.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/