Re: Moving xor_* functions into common header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 20, 2007 at 02:34:48AM +0800, Tan Swee Heng wrote:
> Hi,
> 
> 'grep "static void xor_" crypto/*' shows that cbc.c, ctr.c, pcbc.c and
> xcbc.c share similar xor_* functions. It seems a good idea to
> encourage code reuse by putting them into a common header (iirc
> Evgeniy  suggested it when reviewing one of my earlier mail). It will
> also be useful to me when porting other eSTREAM ciphers. So I would
> like to move them into include/crypto/xor_n.h and make them all
> "static inline". Any objections?

Do you actually need to xor anything that's not a multiple of
8 bytes?

I'm currently working on a patch to just restrict the block
size for non-stream ciphers to multiples of 8 since that's what
we have anyway.  That allows us to just use bitmap_xor.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux