lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 May 2012 09:37:09 +0300
From:	Jussi Kivilinna <jussi.kivilinna@...et.fi>
To:	Johannes Goetzfried 
	<Johannes.Goetzfried@...ormatik.stud.uni-erlangen.de>
Cc:	Herbert Xu <herbert@...dor.apana.org.au>,
	linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
	Tilo Müller 
	<tilo.mueller@...ormatik.uni-erlangen.de>
Subject: Re: [PATCH] crypto: serpent - add x86_64/avx assembler
 implementation

Quoting Johannes Goetzfried  
<Johannes.Goetzfried@...ormatik.stud.uni-erlangen.de>:

> This patch adds a x86_64/avx assembler implementation of the Serpent block
> cipher. The implementation is very similar to the sse2 implementation and
> processes eight blocks in parallel. Because of the new non-destructive three
> operand syntax all move-instructions can be removed and therefore a little
> performance increase is provided.

/* /me adds CPU with AVX to wishlist. */

<snip>

> diff --git a/arch/x86/crypto/serpent_avx_glue.c  
> b/arch/x86/crypto/serpent_avx_glue.c
> new file mode 100644
> index 0000000..85ef6e7
> --- /dev/null
> +++ b/arch/x86/crypto/serpent_avx_glue.c
> @@ -0,0 +1,949 @@
> +/*
> + * Glue Code for AVX assembler versions of Serpent Cipher
> + *
> + * Copyright (C) 2012 Johannes Goetzfried
> + *     <Johannes.Goetzfried@...ormatik.stud.uni-erlangen.de>
> + *
> + * Glue code based on twofish_avx_glue.c by:

Should be serpent_sse2_glue.c?

> + *  Copyright (C) 2011 Jussi Kivilinna <jussi.kivilinna@...et.fi>
> + *

<snip>

> +}, {
> +	.cra_name		= "ecb(serpent)",
> +	.cra_driver_name	= "ecb-serpent-avx",
> +	.cra_priority		= 400,

serpent_sse2_glue.c has priority 400 too, so you should increase  
priority here to 500.

...

Actually about duplicating glue code.. is it really needed? On x86_64,  
both avx and sse2 versions process 8-blocks parallel and therefore  
glue code could be easily shared (as is done in SHA1 SSSE3/AVX).

-Jussi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ