Reputation: 357
I would have thought that if I encrypted all I-frames, the rest of the video would be encrypted because B- and P-frames are both derived from I-frames. Having done a little bit of testing - randomizing each pixel of an I-frame - it does not seem that this is possible, so I wonder if it is even possible? To encrypt the entire video do I have to explicitly encrypt every frame?
Upvotes: 1
Views: 768
Reputation: 7488
Not all B- and P- frames are derivinge picture elements from I-frames at all (but instead from other P-frames) - and those that are, usually only get some of the picture elements from the I-frames. Only encrypting the I-frames would lead to a lot of information being leaked from the unencrypted frames.
Only encrypting some of the frames seems to be a lot of trouble for little gain. The encrypter would need to have detailed knowledge about video encoding and stuff, but would in the end, only provide some flimsy protection.
If its a question off speed then rather chose a fast, but less secure encryption algorithm, than trying to save time by only encrypting the I-frames.
Upvotes: 1
Reputation: 61892
It very much depends on the information you want to protect. Some examples:
If you have a commercial video streaming service, you can encrypt only the I-frames and nobody will try to see the movie with those frames missing. But depending on the encryption method used, this might create inflated data.
If you use for example a block cipher, it needs data to be encrypted as a multiple of the blocksize. If it doesn't perfectly fit, you have to pad every frame encrypted this way. So you will trade a slow decryption for a bigger file size.
Furthermore, this method is problematic, because now your video decoder must be aware what an encrypted frame is and what is not. This adds too much unnecessary logic.
On the other hand it is easier to just encrypt the whole video disregarding the data structure inside of it. This may also be more secure in some cases.
If there is a surveillance video, one can still extract some information like the times people entered and left a building for example, because the contours of the people will be visible and the timestamp can be deduced.
Let's assume for example a surveillance tape has recorded somebody who enters a PIN somewhere. It will be pretty easy to see the shape moving to deduce the PIN from the video despite it being "encrypted".
Upvotes: 2