[FFmpeg-devel] [PATCH] avformat/mov: add support for multiple decryption keys

Michael Niedermayer michael at niedermayer.cc
Sun Nov 12 19:18:46 EET 2023


On Sun, Nov 12, 2023 at 06:06:01PM +0100, Adrien Guinet wrote:
> This commit introduces new options to support more than one decryption
> keys:
> * add a decryption_keys option to MOV, that supports a dictionnary of
>   KID=>key (in hex), using AV_OPT_TYPE_DICT
> * add the corresponding cenc_decryption_keys option to DASH
> 
> Signed-off-by: Adrien Guinet <adrien at guinet.me>
> ---
>  doc/demuxers.texi                          | 12 +++-
>  libavformat/dashdec.c                      |  6 +-
>  libavformat/isom.h                         |  5 +-
>  libavformat/mov.c                          | 80 ++++++++++++++++++----
>  tests/fate/mov.mak                         | 12 ++++
>  tests/ref/fate/mov-3elist-encrypted-kid    | 57 +++++++++++++++
>  tests/ref/fate/mov-frag-encrypted-kid      | 57 +++++++++++++++
>  tests/ref/fate/mov-tenc-only-encrypted-kid | 57 +++++++++++++++
>  8 files changed, 269 insertions(+), 17 deletions(-)
>  create mode 100644 tests/ref/fate/mov-3elist-encrypted-kid
>  create mode 100644 tests/ref/fate/mov-frag-encrypted-kid
>  create mode 100644 tests/ref/fate/mov-tenc-only-encrypted-kid
> 
> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
> index ca1563abb0..9d0ab6025c 100644
> --- a/doc/demuxers.texi
> +++ b/doc/demuxers.texi
> @@ -281,7 +281,11 @@ This demuxer accepts the following option:
>  @table @option
>   @item cenc_decryption_key
> -16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption
> (CENC/AES-128 CTR; ISO/IEC 23001-7).
> +Default 16-byte key, in hex, to decrypt files encrypted using ISO Common
> Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7).

error: corrupt patch at line 51

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231112/65a8b50a/attachment.sig>


More information about the ffmpeg-devel mailing list