[FFmpeg-devel] [PATCH] DES en-/decryption

Reimar Döffinger Reimar.Doeffinger
Sun Oct 14 09:05:03 CEST 2007


Hello,
On Sun, Oct 14, 2007 at 02:05:36AM +0200, Aurelien Jacobs wrote:
> On Sat, 13 Oct 2007 22:15:42 +0200
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
[...]
> > If any of the "Makefile-guys" have some time, maybe you could see if you
> > can come up with something? I'd expect this could be used in some other
> > code as well (I hope others agree this would be nice).
> 
> I haven't really looked at the code, but isn't it possible to simply
> generate this table in a des_init() function or something like that ?

Of course, but then 1) the 256 byte S-box table must be kept 2) it will
use up RAM that can't simply be swapped out to the binary.

> > Index: libavutil/des.h
> > ===================================================================
> > --- libavutil/des.h	(revision 0)
> > +++ libavutil/des.h	(revision 0)
> > @@ -0,0 +1 @@
> > +uint64_t ff_des_encdec(uint64_t in, uint64_t key, int decrypt);
> 
> I think you should add multiple inclusion protection.

Why? As long as there are only function prototypes there should not be
any reason to use them.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list