I have a MPD clip which supports CENC,how to decrypt and play without using any specific DRM engine??Is there any decryption algorithm available to decrypt AES CTR 128 bit?If so will it be used to decrypt MPEG-DASH content?There are some third party libraries available in net like NACL,Openssl,crypto++,which can do AES ctr 128 decryption.Can i use one of them to decrypt DASH Content(CENC supported) ??
MPEG-CENC is simply AES-128 CTR encryption on an ISO BMFF (mp4) file. The specification for how this is applied to CENC is here: https://www.w3.org/TR/2014/WD-encrypted-media-20140828/cenc-format.html and https://www.iso.org/obp/ui/#iso:std:iso-iec:23001:-7:ed-1:v1
And a good explanation of AES-128 CTR https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29
To decrypt you will need the key and also the Initialization Vector (IV) that was used to encrypt the content. This is available from the senc and tenc boxes in the mp4 file. Once you will have those you will simply need to go through the samples or fragments of the file and decrypt and reassemble the mp4 (assuming you want to play it).
As mentioned by Bento tools mp4decrypt gives an example on how to do this: https://github.com/axiomatic-systems/Bento4/blob/master/Source/C%2B%2B/Apps/Mp4Decrypt/Mp4Decrypt.cpp
DASH videos protected using CENC can be played back using many different DRM technologies. The primary factors you need to care for are:
Note that in order to reach a wide spectrum of players, you will need to support multiple DRM technologies simultaneously.
You will find some references to the DRM technologies at the DASH-IF content protection references page.
Note that some browsers may also support the "clearKey" DRM technology, which is a fake implementation that simply takes the decryption key and uses it directly. If you have the decryption key and a video, you can use the clearKey mechanism to play your video.
Edit: If you have the cryptographic key then you can use the mp4decrypt tool from the Bento4 suite to decrypt the fragment files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With