Question

So, we will be given mkv files that are to be sent to multiple client sites. We need to encrypt the contents of those files prior to transmission, but in a way that the client can begin to playback those files, decrypting them on the fly. We know we can simply encrypt the file itself, but then the client would have to decrypt it prior to playback, leaving the unencrypted file open for pilfering. Have been googling for encrypt mkv but have not yet turned up anything. Is this possible to do? A library to accomplish this (Windows encryption side, Linux playback side) would be ideal but a cross-platform app would suffice in a pinch.

Was it helpful?

Solution

There aren't standard DRMs. But you can use standard crypto, You don't want to encrypted the entire file, just the video stream inside the container with a stream cipher, thus you can hook in at the parser level in whatever opensource MKV library you are using to then decrypt the chunk of the stream before it passes it to the codec. You'll want a choose a standard stream cipher that is fast and will let you skip to later places in the stream (e.g. Salsa20)

OTHER TIPS

Stream-layer encryption is certainly supported in Matroska (as opposed to what Adam says):

See: http://matroska.org/technical/specs/notes.html#Encryption

You need to bring the encryption yourself, however. Most likely the way that jbtule proposes will work. Could you report back to us? I'm looking into encrypting some MKV's myself.

This is not possible; as a container format, the Matroska (MKV) format does not support DRM. You'll need to use something like ASF, which is the container format most often used by WMV, or QuickTime.

The subject of how to develop for DRM is far too broad to cover here. You'll need to select what DRM system you want to use and license it. This is non-trivial.

You might start here. Note that, as with most DRM schemes, the only people that you will inconvenience will be your paying customers. If someone wants your content, they will get it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top