[FFmpeg-devel] libavutil: Added cbc mode to cast5.c

supraja reddy supraja0493 at gmail.com
Wed Dec 17 19:53:58 CET 2014


I hope this fixes all the issues .

Supraja

On Wed, Dec 17, 2014 at 10:54 PM, Giorgio Vazzana <mywing81 at gmail.com>
wrote:
>
> Hello,
>
> 2014-12-17 10:27 GMT+01:00 Carl Eugen Hoyos <cehoyos at ag.or.at>:
> > supraja reddy <supraja0493 <at> gmail.com> writes:
> >
> >> -- CAST128 symmetric block cipher, ECB mode
> >> +- CAST128 symmetric block cipher
> >
> > This line is part of the "2.5" paragraph, please
> > do not change this paragraph as 2.5 was already
> > released.
> >
> >> -void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst,
> >> const uint8_t *src, int count, int decrypt);
> >> +void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst,
> >> const uint8_t *src, int count, uint8_t *iv, int decrypt);
> >
> > You cannot do this because cast5.h is an installed
> > header. One possibility is to introduce a new
> > function av_cast5_crypt2().
> >
> >> -    for (j = 0; j < 3; j++){
> >> +    for (j = 0; j < 3; j++) {
> >
> >> -    for (i = 0; i < 1000000; i++){
> >> +    for (i = 0; i < 1000000; i++) {
> >
> > Please avoid cosmetic changes in patches that
> > introduce new features: Either send another
> > cosmetics-only patch or leave it as it is.
> >
> >> +        } else {
> >> +        if (iv) {
> >> +            for (i = 0; i < 8; i++)
> >> +                dst[i] = src[i] ^ iv[i];
> >> +            encipher(cs, dst, dst);
> >
> > Indentation in the new code is wrong.
>
> thank you Carl for the review, I agree all your points are valid.
> There seems to be a bigger problem with this patch though, the IV
> vector is not "propagated" correctly and thus the CBC mode would not
> work.
> Also, it would be nice if we could add some code in the selftest to
> cover this mode too.
>
> Giorgio Vazzana
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavutil-Added-cbc-mode-to-cast128.patch
Type: text/x-patch
Size: 4340 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141218/f116989e/attachment.bin>


More information about the ffmpeg-devel mailing list