[Ffmpeg-devel] [RFC] MXF AES decryption

Baptiste Coudurier baptiste.coudurier
Sun Feb 11 13:54:27 CET 2007


Hi

Reimar D?ffinger wrote:
> Hello,
> On Sun, Jan 14, 2007 at 09:00:59PM +0100, Baptiste Coudurier wrote:
>> Reimar D?ffinger wrote:
>>> [...]
>>>>> @@ -768,9 +913,16 @@
>>>>>              av_log(mxf->fc, AV_LOG_INFO, "source track %d: stream %d, no descriptor found\n", source_track->track_id, st->index);
>>>>>              continue;
>>>>>          }
>>>>> +        essence_container_ul = descriptor->essence_container_ul;
>>>>> +        if (IS_KLV_KEY(essence_container_ul, mxf_encrypted_essence_container)) {
>>>>> +           MXFCryptoContext *cc = mxf_find_track_cryptocontext(mxf, descriptor->linked_track_id);
>>>>> +           if (cc)
>>>>> +               essence_container_ul = cc->source_ul;
>>>>> +           mxf->sync_key = mxf_encrypted_triplet_key;
>>>>> +        }
>>>> That's wrong. descriptor essence container should be original source
>>>> coutainer. That file is broken. Working 100% solution must be
>>>> implemented, also linked track id is optional in S377M. Yes it is
>>>> complicated but a working 100% solution exists.
>>> I moved the sync_key setting someplace else, so the remaining code is
>>> only a hack. I hope you don't expect my to improve a hack without any
>>> samples that would need it (since it's a hack I'm actually tempted to
>>> just remove the linked_track_id check and DMSegment and CryptoFramework
>>> parsing and just grab the source_ul from the first best CryptoContext
>>> found).
>>>
>> Well if track count is only one, I agree that would be more convenient.
> 
> Since the problems are probably caused by an old version of the spec and
> the code is needed for later per-track encryption key (if it will ever
> be implemented *g*) I decided to keep it.
> I fixed it to use source_track->track_id instead of
> descriptor->linked_track_id though.
> Does this version look again to be applied?
> 

Applied, and modified to search for first cryptocontext because it's
must simpler, let's hope that files with multiple cryptocontext will
have a correct container ul, what should be ok, since bug was reported.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list