[FFmpeg-devel] libavutil: added camellia block cipher
mywing81 at gmail.com
Sat Dec 27 17:25:04 CET 2014
2014-12-24 23:41 GMT+01:00 supraja reddy <supraja0493 at gmail.com>:
> Thank you for your reviews. I have attached the updated patch .
> You are using a single array K for all the keys, without distinguishing
>> kw, k and ke as in the rfc. This makes code harder to read/maintain with no
>> real gain I guess. Any reason why you made this decision?
> I have created a single array for all keys to make the key scheduling more
> compact as you have seen. Please let me know if there is any other way to
> do so .
You can separate the keys and still make the scheduling compact by
using a single for loop to compute the 24 k subkeys, and then compute
kw and ke. This will probably also simplify the encrypt() and
>> > + Zl ^= ((Zr << 8) | (Zr >> 24));
>> > + Zr ^= ((Zl << 16) | (Zl >> 16));
>> > + Zl ^= ((Zr >> 8) | (Zr << 24));
>> > + Zr ^= ((Zl >> 8) | (Zl << 24));
>> This optimization is correct, just curious, where did you read about it?
> I have found a specifications page for camellia by the authors of the
> algorithm. Here's the link to it :
> I hope I am allowed to do so.
Of course, you are encouraged to read other material/documentation and
compare/improve your implementation of the algorithm.
>Please let me know if you find anything
> useful in the above link that I can incorporate.
There are other useful optimizations described in that paper, but we
can implement them later.
> Please let me know if there are any further changes.
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel