locked
How to decrypt a encrypted data with different method ?

    Question

  • Hi,

       I am encrypting and decrypting images in my window 8 app. In encryption there is some other login like it is machine based code. But the decryption logic is that it can decrypt any image.

       Is it possible that that for encryption and decryption we can use different formats to do complete these task. Means for encryption of image we use a encryption method available  but for decryption of same image we use different way.


    Wednesday, June 4, 2014 7:33 AM

Answers

  • It sounds like sort of a fit for an asymmetric algorithm.  You'd have to give the encryption systems a public key.  The receivers would then decrypt the image with the private key.

    This gets a bit complicated, because asymmetric encryption doesn't encrypt large datasets such as images.  You'll have to create a random password and IV and then encrypt the image using those and a symmetric algorithm.  Then, use the asymmetric algorithm to encrypt the key and IV you randomly chose.

    On the decryption end, do this in reverse:  decrypt the key and IV using your asymmetric algorithm and private key, then decrypt the image data using the symmetric algorithm.


    Darin R.

    Wednesday, June 4, 2014 1:56 PM