[DJI-log-discuss] DJI TXT file format

Ross Finlayson finlayson at live555.com
Sat Jan 18 22:54:15 PST 2020



> On Jan 18, 2020, at 10:33 PM, Daniel Flack <dflack95 at gmail.com> wrote:
> 
> There is no such thing as a scramble table. The way DJI actually generates these keys is to use the appropriate bytes (as mentioned above) to calculate a 64 bit CRC for the specific packet. This is the same general process you use to _select_ the right row in your scramble table, except, the CRC64 algorithm takes the same input and returns the actual key without using a specific tabular lookup. 

In practice, it doesn’t matter whether the 8 bytes that are XORed with each 8 bytes (in turn) of the "record payload” (except the very first byte) to scramble/unscramble each “record payload" are generated by a function, or looked up from from a table,  The effect is exactly the same.

You’re likely correct (as other people have also speculated in the past) that DJI generates these 8 bytes using something like a CRC function, rather than using a table.  But for our purposes, a table is just as good.  (Our current table takes up only 32 kBytes; a complete table - which would work for all possible “record type”s (rather than just the first 16, as at present) would be 0.5 MBytes.  That’s not an excessively large table to embed in a program these days.)

Please continue to try to figure out an algorithm for generating these bytes.  But unless/until we have a *specific* way of generating (the equivalent of) the scramble table for rows > 0x1000 (i.e., for “record type”s >= 16), then we haven’t really gained anything.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the DJI-log-discuss mailing list