Encrypt an image using openssl
I have a .bmp image. I wanted to encrypt the image file using openssl command. The following is the command I have used to encrypt the image.
openssl enc -aes-128-cbc -e -in pic_original.bmp -out aes128cbc.bmp -K 00112233445566778889aabbccddeeff -iv 0102030405060708
As per ECB mode is concerned I should be able to view partial image when I encrypt the file using ECB mode however I cannot see the image at all. The image viewing software says there is bogus header data
Is there any thing wrong in the command I used for encrypting the file. Can someone help me with this please
That's because you encrypted everything, including header. You should extract bitmap data into a raw stream, encrypt that and attach header back to it.