Page 1 of 1

Disabling Ciphers in Image Magick

Posted: 2015-05-06T23:20:05-07:00
by meenal.joshi
Hi,

I want disable ciphers in ImageMagick for windows.
ImageMagick version: ImageMagick-6.9.1-Q16
I am using Windows 7 - 64 bit OS

How can I configure --disable-ciphers in ImageMagick (for windows)?
I am not able to find any configure program which will disables ciphering for ImageMagick.

Any suggestions on how I can resolve this issue?

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-06T23:38:27-07:00
by snibgo
"--disable-cipher" is an option to "configure". If you compile IM yourself, just put the option in the configure command.

If you don't compile IM yourself, this option is not available.

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-07T00:03:33-07:00
by meenal.joshi
Ok. It means if I am installing ImageMagick (for image processing like conversion from one format to another) and NOT compile IM, I cannot disable ciphers? and ImageMagick will by default perform enciphering and deciphering while Image conversion?

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-07T00:14:12-07:00
by snibgo
No. The "--disable-cipher" at compilation prevents the use of the command-line options "-encipher" and "-decipher".

By default, IM does not encipher or decipher images. It will only do so if you tell it to.

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-07T00:19:55-07:00
by meenal.joshi
ok. Thanks a lot for your help :)

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-29T05:30:42-07:00
by SanjayJadhav
Hi Guys,

Even I have to disable Cipher from my ImageMagick source code. I have following queries. It would be really great If you guys can provide me help.

1.Do you mean to say that I have to put this disable command in "C:\ImageMagick-6.9.1\magick\magick-config.h" file
and then build Configure solution situated at "C:\ImageMagick-6.9.1\VisualMagick\configure\configure.sln" and later run the generated configure.exe . If so what is the exact syntax and location to put this in "C:\ImageMagick-6.9.1\magick\magick-config.h"
Here my source code is at "C:\ImageMagick-6.9.1" location.

2. In order to remove the Encryption code from ImageMagick sourec code I have removed the internal code (except for return statements) of all of the functions in "C:\ImageMagick-6.9.1\magick\cipher.c" and "C:\ImageMagick-6.9.1\magick\signature.c" and then rebuild my VisualStaticMTD.sln solution. Will it ensure that this change has completely removed the encryption capabilities from my ImageMagick. Or do I have to perform Disable Cipher mentioned in above point 1.

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-29T09:22:40-07:00
by magick
Encryption code is isolated to cipher.c. Signature.c supports a one-way hash which is not encryption code. Removing the code in cipher.c as you suggested is a fool-proof way to remove all traces of encryption inside ImageMagick. Undefining MAGICKCORE_CIPHER_SUPPORT in magick/magick-baseconfig.h ensures that the binary distribution of ImageMagick does not include encryption support.

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-30T06:30:55-07:00
by SanjayJadhav
Aftrer removing the code in cipher.c I am just again rebuilding the VisualStaticMTD.sln solution and running the imageMagick installer again. Does it ensure that my changes made in the cipher.c and signature.c are there in my generated exe of imageMagick. I am asking this question because I could make it out that cipher.c and signature.c are part of which DLL that are compressed and put inside generated exe of imageMagick by the installer.

Also can you please tell the exact complete string that needs to be put in the magick/magick-baseconfig.h . Is it UNDEFINE MAGICKCORE_CIPHER_SUPPORT?

Re: Disabling Ciphers in Image Magick

Posted: 2015-05-30T06:34:07-07:00
by SanjayJadhav
Hey and thanks lot for your previous answer. It gave me a confidence of going on the right path for generating exe of imageMagick.