This is the x86-64 version of the Salsa20 stream cipher algorithm. The
original assembly code came from
<http://cr.yp.to/snuffle/salsa20/amd64-3/salsa20.s>. It has been
reformatted for clarity.
Signed-off-by: Tan Swee Heng <[email protected]>
Hi Herbert, as mentioned some time ago, I don't have an x86-64. So
please help me test it. Thanks!
The Python script used to automate the reformatting is also attached
in case anyone is interested.
* Tan Swee Heng | 2007-12-17 02:06:15 [+0800]:
>Hi Herbert, as mentioned some time ago, I don't have an x86-64. So
>please help me test it. Thanks!
I tested it and it passed 5 of 5 tests :)
>diff --git a/crypto/Kconfig b/crypto/Kconfig
>index 221356b..b0481f7 100644
>--- a/crypto/Kconfig
>+++ b/crypto/Kconfig
>@@ -504,6 +504,21 @@ config CRYPTO_SALSA20_586
> The Salsa20 stream cipher algorithm is designed by Daniel J.
> Bernstein <[email protected]>. See <http://cr.yp.to/snuffle.html>
>
>+config CRYPTO_SALSA20_X86_64
>+ tristate "Salsa20 stream cipher algorithm (x86_64) (EXPERIMENTAL)"
>+ depends on (X86 || UML_X86) && 64BIT
>+ depends on EXPERIMENTAL
>+ select CRYPTO_BLKCIPHER
>+ select CRYPTO_SALSA20
>+ help
I why do you select CRYPTO_SALSA20 ? I was able to build & test it
without it.
Sebastian
On Mon, Dec 17, 2007 at 02:06:15AM +0800, Tan Swee Heng wrote:
> This is the x86-64 version of the Salsa20 stream cipher algorithm. The
> original assembly code came from
> <http://cr.yp.to/snuffle/salsa20/amd64-3/salsa20.s>. It has been
> reformatted for clarity.
>
> Signed-off-by: Tan Swee Heng <[email protected]>
Patch applied. Thanks a lot!
> Hi Herbert, as mentioned some time ago, I don't have an x86-64. So
> please help me test it. Thanks!
> The Python script used to automate the reformatting is also attached
> in case anyone is interested.
Yes it works fine here.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Hi Herbert and Sebastian, thanks for testing the x86-64
implementation. Much appreciated. :-)
I will remember to use "git-format-patch -M" next time. I didn't know
about the -M switch before this.
Sebastian is right about the "select CRYPTO_SALSA20". It seems
unnecessary in both i586 and x86-64 versions. Attached is a patch that
removes them.
Swee Heng
On Tue, Dec 18, 2007 at 01:51:27AM +0800, Tan Swee Heng wrote:
>
> Subject: [PATCH] Removed dependency on CRYPTO_SALSA20
>
> Signed-off-by: Tan Swee Heng <[email protected]>
Patch applied. Thanks.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt