I read that there are different ways to apply visual cryptography. One is to generate two images that when overlapped provide the original image. The main issue of using this approach with a video is that I would need to generate those two images for each frame. Is there a way to generate a single decryption image for the entire video?

In that case such image would act as a symmetric key and so all the encrypted frames could be decrypted with such key.

  • $\begingroup$ It is impossible to answer questions like this without knowing what kind of security you are looking for. Are you looking for information theoretic security? Also, what performance requirements do you have? $\endgroup$
    – mikeazo
    Feb 12 '18 at 17:02
  • $\begingroup$ @mikeazo I need the encrypted video to be very hard to decrypt without the decryption image. Moreover, the encrypted video, if rendered, should be very different from the original one. The decryption should happen in real time so as new encrypted frames arrive they are composed with the decryption image to get the original frames. $\endgroup$
    – David
    Feb 12 '18 at 17:28
  • 1
    $\begingroup$ @David It does not sound like visual cryptography is the right tool for this job - Have you considered a basic stream cipher? Is there some reason regular old encryption of the video frames is not appropriate? $\endgroup$
    – Ella Rose
    Feb 12 '18 at 18:54
  • $\begingroup$ @EllaRose A basic stream cipher would be the best solution but I think it does not suit my implementation. I want to send the encrypted video over WebRTC which does not allow to have custom decryption. The idea therefore was to send the encrypted stream and then overlap it with the decryption image to display the original video. $\endgroup$
    – David
    Feb 12 '18 at 19:00
  • $\begingroup$ @David Why would you believe WebRTC cannot send generic unstructured data? This could really be what you want $\endgroup$
    – DannyNiu
    Feb 13 '18 at 9:05

The simplest form of visual cryptography use transparencies that each individually convey no recognizable information, but reveal a meaningful image when precisely aligned visual cryptography

The basic approach for doing the same with video is using such visual cryptography to encipher each frame. That works, but (as stated in the question) requires generating two images for each frame, and playing these in perfect synchronization. Also, the decoding won't be easy: the eye is good at averaging luminous intensity, and projection on an ordinary screen, even if perfertly superimposed, will lack contrast. Further, lossy video compression (as most video compression schemes are) will tend to prevent decoding.

It is tempting to make the image in one of the two video streams still, which in particular allows decoding with fair contrast simply by projecting on a screen that serves as key. But that's very insecure! What's moving in the original video will be distinguishable to the naked eye; and XORing each frame with the previous one will make that even more apparent: the XOR of two consecutive frame in the ciphertext is also the XOR of two consecutive frame in the plaintext, and is very revealing; in particular, that shows the left and right contour of something moving horizontally.

I see no secure fix.

  • $\begingroup$ I'm not sure this example is working. Look at your final image. It's got a horrible background and is not anti-aliased. I don't think that you've any control over Microsoft ClearType. Can your technique encrypt this question and preserve colour & quality? $\endgroup$
    – Paul Uszak
    Feb 14 '18 at 12:57
  • $\begingroup$ @PaulUszak: I'm not aware of any form of visual cryptography (defined as allowing reading an encrypted image with the naked eye using a physical decoding key and no computer for decoding, yet well concealing the message) that avoids the "horrible background" issue (or a similar one for the foreground). Notice that the concealed message here is text in some bitmap fond, but could as well be any black and white image. [reposted with correction] $\endgroup$
    – fgrieu
    Feb 14 '18 at 14:45

Is there a way to generate a single decryption image for the entire video?

Only if it's used as an Ersatz password from which a traditional encryption key is derived. All video encryption /DRM is accomplished by encrypting the underlying video stream. In encrypted form, the stream will be a pseudo random stream of bytes and not decode at all.

Your scheme looks like a video version of a stream cipher, but operating on the decoded video frames rather than the raw underlying data. I think that you might be looking at a case of the tail wagging the dog. If your app can't use traditional video DRM, then you need to look at re-architecting your app. Can you find an example of a commercial product that does it your way? Unlikely. And if WebRTC can't perform custom decoding, how would you overlap the two videos and do some type of visual XOR on them? Further, would that mean twice the bandwidth?

There's some contemporary high level stuff here that might help.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.