如何解密AES-128加密的m3u8视频文件? [英] How to decrypt AES-128 encrypted m3u8 video files?

查看:5447
本文介绍了如何解密AES-128加密的m3u8视频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解密AES-128加密的m3u8视频文件,例如:

I trying to decrypt AES-128 encrypted m3u8 video files such as this one :

m3u8文件:

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:NO
#EXT-X-VERSION:2
#EXT-X-FAXS-CM:MII6lAYJKoZIhvcNAQcCoII6hTCCOoECAQExCzAJBgUrDgMCGgUAM... very long key...
#EXT-X-KEY:METHOD=AES-128,URI="faxs://faxs.adobe.com",IV=0X99b74007b6254e4bd1c6e03631cad15b
#EXT-X-TARGETDURATION:8
#EXTINF:8,
video.mp4Frag1Num0.ts
#EXTINF:8,
video.mp4Frag1Num1.ts
...

我已经尝试过openssl:

I've tried with openssl :

openssl aes-128-cbc -d -kfile key.txt -iv 99b74007b6254e4bd1c6e03631cad15b -nosalt -in video_enc.ts -out video_dec.ts

key.txt包含很长的密钥 ->

key.txt contains the very long key -->

bad decrypt
1074529488:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:539:

我在做什么错了?

推荐答案

要解密加密的视频流,您需要加密密钥. 此密钥不是流的一部分.它应该单独获得.

In order to decrypt encrypted video stream you need encryption key. This key is not part of the stream. It should be obtained separately.

EXT-X-FAXS-CM标头包含DRM元数据,而不包含密钥.

EXT-X-FAXS-CM header contains DRM meta-data and not the key.

这是Adobe Media Server开发人员指南的专家: 受Adobe Access Server保护的变体播放列表还需要包含#EXT-X-FAXS-CM标签.变体播放列表中的#EXT-X-FAXS-CM标签的值是引用单个流之一的DRM元数据的相对URI.在客户端,变体播放列表中的#EXT-X-FAXS-CM标签将为用于创建DRM会话.相同的DRM会话将用于变体播放列表中的所有加密M3U8文件.

This is excert from Adobe Media Server developer guide: The Adobe Access Server protected variant playlist also needs to include the #EXT-X-FAXS-CM tag. The value of #EXT-X-FAXS-CM tag in variant playlist is the relative URI referring to the DRM metadata of one of the individual streams.At the client, the #EXT-X-FAXS-CM tag in variant playlist will be used to create the DRM session. The same DRM session will be used for all encrypted M3U8 files inside the variant playlist.

完整指南可在此处找到: http://help.adobe.com/zh_CN/adobemediaserver/devguide /WS5262178513756206-4b6aabd1378392bb59-7fe8.html

Full guide can be found here: http://help.adobe.com/en_US/adobemediaserver/devguide/WS5262178513756206-4b6aabd1378392bb59-7fe8.html

还提到了Faxs://faxs.adobe.com URI是用于本地密钥服务的. 因此,密钥是从设备本地获取的.

There is also mention that faxs://faxs.adobe.com URI is for local key serving. So key obtained locally from a device.

这篇关于如何解密AES-128加密的m3u8视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆