As Deepfake and other technologies make video anti-counterfeiting very difficult, I want to design a scheme based on cryptography to verify that a video is actually captured by the camera. At the same time, I hope this video supports truncation. For example, I have a video that takes one hour long, and if I intercept one minute without any other changes, then the video for this one minute is true.

A simple method is to use digital signature. The video stream or video frame captured by the camera is signed with private key, so that other people can verify it. However, in my application scenario, I hope anyone can capture a segment of the video and prove that the captured video is actually recorded rather than forged. It seems that the digital signature method is not suitable for this scene, because only when the video is complete, we can prove its integrity.

Message authentication codes (MAC) can also prove authenticity, but this requires the distribution of a secret.

Do you know any cryptographic primitives or schemes that can be used in this scenario?

  • 3
    $\begingroup$ Embedding a digital signature in a video at the camera level is feasible, would have very little negative impact on data size and power consumption. It would be effective to some useful degree. As most security measure, it wouldn't be absolute: it's conceivable to project a fake image on a true camera (as in early telecinema) to sign doctored images. That would perhaps be detectable due to optical artifacts, but another level of attack can digitally simulate the sensor to the camera. $\endgroup$
    – fgrieu
    Commented Mar 12, 2021 at 7:52
  • 2
    $\begingroup$ Except op wants to allow truncation, so you'd have to sign frames (or maybe short segments). That would increase processor use significantly. $\endgroup$ Commented Mar 12, 2021 at 14:32

1 Answer 1


Most video formats generate periodic key frames where the entire picture is rendered and then specify subsequent frames which are differences from the previous image. This is beneficial because this dramatically reduces the amount of data that needs to be transmitted, while still allowing periodic seeking.

It would be possible to embed a cryptographic signature covering the previous or current key frame and its subsequent data, but the video format would have to support it. This would be the least invasive way of doing the operation because without transcoding, a user cannot efficiently seek to any point in the stream other than a key frame. Sometimes these offsets are stored in an index at the end of the file, and, assuming the format supported it, you could add an additional index for that purpose. I cannot speak to the contents of video formats that would support this.

You would want to include as part of the signature some additional metadata, such as a stream ID and a key frame count or timestamp to avoid unexpected out-of-order editing and splicing. You are also probably going to want to include the full header data and any other structural data as well. The data included in the MAC of TLS is a good example of protecting the full record appropriately from tampering.

And, of course, all this verifies is that someone with the private key created the signature, not who that was or whether the data is accurate. If your camera is not sufficiently tamper resistant, malicious parties will be able to extract the private key. If the camera is tamper resistant but is presented with a false or misleading image to record, it will of course record false or misleading data. Cryptography and security cannot prevent people from presenting false or misleading data as fact. You'd definitely want to consult with a suitable expert in tamper-resistant systems to make the system as secure as is practically possible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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