Hi, On Fri, Sep 2, 2011 at 4:23 PM, David Goldwich <[email protected]> wrote: > On 09/02/2011 07:16 PM, Ronald S. Bultje wrote: >> On Thu, Sep 1, 2011 at 11:21 PM, David Goldwich >> <[email protected]> wrote: >>> +typedef struct OMAContext { >>> + uint64_t content_start; >>> + int encrypted; >>> + uint16_t k_size; >>> + uint16_t e_size; >>> + uint16_t i_size; >>> + uint16_t s_size; >>> + uint32_t rid; >>> + uint8_t r_val[24]; >>> + uint8_t n_val[24]; >>> + uint8_t m_val[8]; >>> + uint8_t s_val[8]; >>> + uint8_t sm_val[8]; >>> + uint8_t e_val[8]; >>> + uint8_t iv[8]; >>> + struct AVDES av_des; >>> +} OMAContext; >> >> First off - fantastic work! >> >> Could you document the code a little bit? It's hard to follow for >> those poor souls that are not you. :-). E.g. what data does each >> variable in this context hold, and where in the decryption are they >> used? Maybe a small diagram. >> >> The idea is to document it such that if you get hit by a truck (or >> some analogy of that kind), someone else could still read the code >> without having to re-disassemble binaries. > > In fact, it was more readable and better documented. The problem is that > the encryption mechanism is of course reverse-engineered (by someone who > wants to remain anonymous) and after consulting with Benjamin, one of > the original developers of the demuxer, we thought that we might just > not make it too obvious what's going on. Even though we all think this > stuff is way too old and long out of Sony's radar (they abandoned all > the technology and software years ago). Plus you can read much of it in > their own patents, anyway, I think. > > I don't think big S cares about this too much and I don't object at all > making the code clearer. Otherwise maybe we could place the > documentation somewhere else?
Putting it somewhere else is fine with me also. I'm just concerned that somebody else may need to understand this code at some point also, and would like to help out the poor soul pre-emptively. Benjamin, any opinions? Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
