All of lore.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies
@ 2005-02-25 21:46 Adrian Bunk
  2005-02-25 22:00 ` James Morris
  2005-02-25 22:08 ` Chris Friesen
  0 siblings, 2 replies; 5+ messages in thread
From: Adrian Bunk @ 2005-02-25 21:46 UTC (permalink / raw)
  To: jmorris, davem; +Cc: linux-kernel

2.6.11-rc4-mm1 contains an option (IEEE80211_CRYPT_CCMP) that selects 
CRYPTO_AES - but this is currently wrong on i386.

This patch changes CRYPTO_AES to being the only user-visible options and 
selecting either CRYPTO_AES_586 or a new CRYPTO_AES_GENERIC option 
depending on the platform.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

BTW: Does CRYPTO_AES_586 work on an 386 or 486?

 crypto/Kconfig  |   26 +++++++-------------------
 crypto/Makefile |    2 +-
 2 files changed, 8 insertions(+), 20 deletions(-)

--- linux-2.6.11-rc4-mm1-full/crypto/Kconfig.old	2005-02-25 22:26:20.000000000 +0100
+++ linux-2.6.11-rc4-mm1-full/crypto/Kconfig	2005-02-25 22:28:44.000000000 +0100
@@ -133,7 +133,9 @@
 
 config CRYPTO_AES
 	tristate "AES cipher algorithms"
-	depends on CRYPTO && !(X86 && !X86_64)
+	depends on CRYPTO
+	select CRYPTO_AES_GENERIC if !(X86 && !X86_64)
+	select CRYPTO_AES_586 if (X86 && !X86_64)
 	help
 	  AES cipher algorithms (FIPS-197). AES uses the Rijndael 
 	  algorithm.
@@ -151,25 +153,11 @@
 
 	  See <http://csrc.nist.gov/CryptoToolkit/aes/> for more information.
 
-config CRYPTO_AES_586
-	tristate "AES cipher algorithms (i586)"
-	depends on CRYPTO && (X86 && !X86_64)
-	help
-	  AES cipher algorithms (FIPS-197). AES uses the Rijndael 
-	  algorithm.
+config CRYPTO_AES_GENERIC
+	tristate
 
-	  Rijndael appears to be consistently a very good performer in
-	  both hardware and software across a wide range of computing 
-	  environments regardless of its use in feedback or non-feedback 
-	  modes. Its key setup time is excellent, and its key agility is 
-	  good. Rijndael's very low memory requirements make it very well 
-	  suited for restricted-space environments, in which it also 
-	  demonstrates excellent performance. Rijndael's operations are 
-	  among the easiest to defend against power and timing attacks.	
-
-	  The AES specifies three key sizes: 128, 192 and 256 bits	  
-
-	  See <http://csrc.nist.gov/encryption/aes/> for more information.
+config CRYPTO_AES_586
+	tristate
 
 config CRYPTO_CAST5
 	tristate "CAST5 (CAST-128) cipher algorithm"
--- linux-2.6.11-rc4-mm1-full/crypto/Makefile.old	2005-02-25 22:29:33.000000000 +0100
+++ linux-2.6.11-rc4-mm1-full/crypto/Makefile	2005-02-25 22:29:42.000000000 +0100
@@ -19,7 +19,7 @@
 obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
 obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
 obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
-obj-$(CONFIG_CRYPTO_AES) += aes.o
+obj-$(CONFIG_CRYPTO_AES_GENERIC) += aes.o
 obj-$(CONFIG_CRYPTO_CAST5) += cast5.o
 obj-$(CONFIG_CRYPTO_CAST6) += cast6.o
 obj-$(CONFIG_CRYPTO_ARC4) += arc4.o



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies
  2005-02-25 21:46 [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies Adrian Bunk
@ 2005-02-25 22:00 ` James Morris
  2005-02-25 22:08 ` Chris Friesen
  1 sibling, 0 replies; 5+ messages in thread
From: James Morris @ 2005-02-25 22:00 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: davem, linux-kernel

On Fri, 25 Feb 2005, Adrian Bunk wrote:

> 2.6.11-rc4-mm1 contains an option (IEEE80211_CRYPT_CCMP) that selects 
> CRYPTO_AES - but this is currently wrong on i386.
> 
> This patch changes CRYPTO_AES to being the only user-visible options and 
> selecting either CRYPTO_AES_586 or a new CRYPTO_AES_GENERIC option 
> depending on the platform.

Good thinking, didn't think to chain selects.

> BTW: Does CRYPTO_AES_586 work on an 386 or 486?

>From memory it is generic i386 asm optimize for P5.


- James
-- 
James Morris
<jmorris@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies
  2005-02-25 21:46 [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies Adrian Bunk
  2005-02-25 22:00 ` James Morris
@ 2005-02-25 22:08 ` Chris Friesen
  2005-02-25 22:29   ` Adrian Bunk
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Friesen @ 2005-02-25 22:08 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: jmorris, davem, linux-kernel

Adrian Bunk wrote:

> --- linux-2.6.11-rc4-mm1-full/crypto/Kconfig.old	2005-02-25 22:26:20.000000000 +0100
> +++ linux-2.6.11-rc4-mm1-full/crypto/Kconfig	2005-02-25 22:28:44.000000000 +0100
> @@ -133,7 +133,9 @@
>  
>  config CRYPTO_AES
>  	tristate "AES cipher algorithms"
> -	depends on CRYPTO && !(X86 && !X86_64)
> +	depends on CRYPTO
> +	select CRYPTO_AES_GENERIC if !(X86 && !X86_64)
> +	select CRYPTO_AES_586 if (X86 && !X86_64)

Wouldn't the 586 one also work on x86_64?

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies
  2005-02-25 22:08 ` Chris Friesen
@ 2005-02-25 22:29   ` Adrian Bunk
  2005-03-08 19:50     ` H. Peter Anvin
  0 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2005-02-25 22:29 UTC (permalink / raw)
  To: Chris Friesen; +Cc: jmorris, davem, linux-kernel

On Fri, Feb 25, 2005 at 04:08:07PM -0600, Chris Friesen wrote:
> Adrian Bunk wrote:
> 
> >--- linux-2.6.11-rc4-mm1-full/crypto/Kconfig.old	2005-02-25 
> >22:26:20.000000000 +0100
> >+++ linux-2.6.11-rc4-mm1-full/crypto/Kconfig	2005-02-25 
> >22:28:44.000000000 +0100
> >@@ -133,7 +133,9 @@
> > 
> > config CRYPTO_AES
> > 	tristate "AES cipher algorithms"
> >-	depends on CRYPTO && !(X86 && !X86_64)
> >+	depends on CRYPTO
> >+	select CRYPTO_AES_GENERIC if !(X86 && !X86_64)
> >+	select CRYPTO_AES_586 if (X86 && !X86_64)
> 
> Wouldn't the 586 one also work on x86_64?

I'd assume yes.

But the CRYPTO_AES_586 were already this way, and since I don't know the 
history of these dependencies this isn't changed by my patch.

> Chris

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies
  2005-02-25 22:29   ` Adrian Bunk
@ 2005-03-08 19:50     ` H. Peter Anvin
  0 siblings, 0 replies; 5+ messages in thread
From: H. Peter Anvin @ 2005-03-08 19:50 UTC (permalink / raw)
  To: linux-kernel

Followup to:  <20050225222938.GG3311@stusta.de>
By author:    Adrian Bunk <bunk@stusta.de>
In newsgroup: linux.dev.kernel
> > 
> > Wouldn't the 586 one also work on x86_64?
> 
> I'd assume yes.
> 
> But the CRYPTO_AES_586 were already this way, and since I don't know the 
> history of these dependencies this isn't changed by my patch.
> 

Anything written in assembly would have to be specifically adjusted to
work on x86-64 (different ABI, 64-bit pointers, etc.)

	-hpa

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-08 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-25 21:46 [2.6 patch] better CRYPTO_AES <-> CRYPTO_AES_586 dependencies Adrian Bunk
2005-02-25 22:00 ` James Morris
2005-02-25 22:08 ` Chris Friesen
2005-02-25 22:29   ` Adrian Bunk
2005-03-08 19:50     ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.