Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-28 Thread Michael Niedermayer
On Wed, Jan 28, 2015 at 04:06:19PM +0100, Giorgio Vazzana wrote: 2015-01-27 22:01 GMT+01:00 supraja reddy supraja0...@gmail.com: Hello, +for (i = 0; i cs-ksize; i++) { +Me[i] = Key[2 * i]; +Mo[i] = Key[2 * i + 1]; +} +for (i = 0; i cs-ksize; i++)

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-28 Thread Giorgio Vazzana
2015-01-27 22:01 GMT+01:00 supraja reddy supraja0...@gmail.com: Hello, +for (i = 0; i cs-ksize; i++) { +Me[i] = Key[2 * i]; +Mo[i] = Key[2 * i + 1]; +} +for (i = 0; i cs-ksize; i++) +cs-S[cs-ksize - i - 1] = tf_RS(Me[i], Mo[i]); Can't the

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-27 Thread supraja reddy
Hello, +for (i = 0; i cs-ksize; i++) { +Me[i] = Key[2 * i]; +Mo[i] = Key[2 * i + 1]; +} +for (i = 0; i cs-ksize; i++) +cs-S[cs-ksize - i - 1] = tf_RS(Me[i], Mo[i]); Can't the previous two for loops be merged together? You wanted me to divide

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-26 Thread Reimar Döffinger
On 25 January 2015 20:00:07 CET, supraja reddy supraja0...@gmail.com wrote: Sorry. I forgot to make a small change. Updated the patch. Not specifically related to this patch, but with this many implementations I think it is high time we warn about the security implications of using them. My

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-25 Thread supraja reddy
Hello, I have made all the changes as suggested. If the number of if-else loops in init() seem to be too many, please let me know I will change it but I have put them to handle the return values and overflow issues. If there are any other changes, please let me know. Thanks, Supraja On Sun, Jan

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-24 Thread Giorgio Vazzana
Hello, thanks for the new patch. As I said the code looks quite good, here's what I spotted in my review: From b46d6a457aeee319fc6e56217a265c9881a34c2c Mon Sep 17 00:00:00 2001 From: Supraja Meedinti supraja0...@gmail.com Date: Thu, 15 Jan 2015 21:35:16 +0530 Subject: [PATCH] libavutil:

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-22 Thread Michael Niedermayer
Hi On Wed, Jan 21, 2015 at 01:26:18AM +0530, supraja reddy wrote: Hello, Thanks for you reviews. I see this is only use during init but if it still matters speedwise and assuming this is a galois field multiplication the it can be written as EXP_GF256[LOG_GF256[a] + LOG_GF256[b]]

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-20 Thread Michael Niedermayer
On Thu, Jan 15, 2015 at 10:21:22PM +0530, supraja reddy wrote: Hello, I have attached the patch for twofish implementation. Please let me know if there are any changes to be made. Thank you, Supraja [...] +av_cold int av_twofish_init(AVTWOFISH *cs, const uint8_t *Key, int key_bits)

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-20 Thread supraja reddy
Hello, Thanks for you reviews. I see this is only use during init but if it still matters speedwise and assuming this is a galois field multiplication the it can be written as EXP_GF256[LOG_GF256[a] + LOG_GF256[b]] (for a!=0 b!=0) Do you want me to insert tables EXP_GF256 and LOG_GF256

[FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-15 Thread supraja reddy
Hello, I have attached the patch for twofish implementation. Please let me know if there are any changes to be made. Thank you, Supraja From f86554850a8b0be2e32fcd341ca297c7ce73a941 Mon Sep 17 00:00:00 2001 From: Supraja Meedinti supraja0...@gmail.com Date: Thu, 15 Jan 2015 21:35:16 +0530

Re: [FFmpeg-devel] libavutil: Added twofish block cipher

2015-01-15 Thread Michael Niedermayer
On Thu, Jan 15, 2015 at 10:21:22PM +0530, supraja reddy wrote: Hello, I have attached the patch for twofish implementation. Please let me know if there are any changes to be made. Thank you, Supraja Makefile |3 twofish.c | 351