Skip to contentSkip to conversation

AES x86-64-asm impl.

PATCH Andi Kleen 9 participants 15 messages Oct 2, 2004 – Oct 5, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 10 lines · [email protected] (Florian Bohrer) writes:

hi,

this is my first public kernel patch. it is an x86_64 asm optimized version of AES for the crypto-framework. the patch is against 2.6.9-rc2-mm1 but should work with other versions too.

the asm-code is from Jari Ruusu (loop-aes).
the org. glue-code is from Fruhwirth Clemens.

Thanks. I will add it to the x86-64 patchkit. I have a 64bit version here too, but it had a bug somewhere and I didn't have time to fix it yet.

Unfortunately it's still fundamentally 32bit. Anybody interested in doing a true 64bit AES?

-Andi

#2 lore raw
Quoted 2 lines · Andi Kleen

Unfortunately it's still fundamentally 32bit. Anybody interested in doing a true 64bit AES?

i doubt it helps any -- except for benchmark-only purposes.

there's a description of the 32-bit T-table approach in section 7.3 of <http://fp.gladman.plus.com/cryptography_technology/rijndael/aesspec.pdf>

basically the tables are 8-bit -> 32-bit maps, and there are 4 of them (2 for each direction). to go to 64-bit you'd need 16-bit -> 64-bit maps... 512KiB per table. there are some other variations on the tables which are smaller, but nothing as small as the 1024 bytes per table of the 32-bit implementation.

there's a completely different approach using bit-slicing (basically consider each register as 64 1-bit registers), which yields great throughput but cruddy latency -- you basically need lots of non-dependant streams to make this pay off (i.e. it might work for disk crypto processing multiple blocks simultaneously).

-dean

#3 lore raw
In reply to Andi Kleen
Quoted 5 lines · Andi Kleen
Quoted 2 lines · [email protected] (Florian Bohrer) writes:

the asm-code is from Jari Ruusu (loop-aes).
the org. glue-code is from Fruhwirth Clemens.

Thanks. I will add it to the x86-64 patchkit.

Here we go again...

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Linus, please consider dropping this.

Signature · 1 line
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD
#4 lore raw
Quoted 5 lines · Jari Ruusu
Quoted 4 lines · Andi Kleen
Quoted 2 lines · [email protected] (Florian Bohrer) writes:

the asm-code is from Jari Ruusu (loop-aes).
the org. glue-code is from Fruhwirth Clemens.

Quoted 8 lines
Quoted 1 line

Thanks. I will add it to the x86-64 patchkit.

Here we go again...

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Linus, please consider dropping this.

I guess Linus will do so,
but may I ask you why don't you want to see your code merged in mainline ?

Thanks.

Signature · 4 lines
Paolo
Personal home page: www.ciarrocchi.tk
See my photos: http://paolociarrocchi.fotopic.net/
Buy cool stuff here: http://www.cafepress.com/paoloc
#5 lore raw
Quoted 8 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 14:51:19 +0300, Jari Ruusu

Quoted 4 lines

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Linus, please consider dropping this.

I guess Linus will do so,
but may I ask you why don't you want to see your code merged in mainline ?

I don't want my name associated with mainline linux cryptoapi or cryptoloop or their developers.

Signature · 1 line
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD
#6 lore raw
Quoted 5 lines · Jari Ruusu
Quoted 4 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 14:51:19 +0300, Jari Ruusu

Quoted 3 lines

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Linus, please consider dropping this.

I guess Linus will do so,
but may I ask you why don't you want to see your code merged in mainline ?

I don't want my name associated with mainline linux cryptoapi or cryptoloop or their developers.

I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

Signature · 4 lines
Paolo
Personal home page: www.ciarrocchi.tk
See my photos: http://paolociarrocchi.fotopic.net/
Buy cool stuff here: http://www.cafepress.com/paoloc
#7 lore raw
Quoted 3 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 15:20:43 +0300, Jari Ruusu I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

You haven't looked at cryptoloop security, have you?

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

Signature · 1 line
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD
#8 lore raw
Quoted 6 lines · Jari Ruusu
Quoted 3 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 15:20:43 +0300, Jari Ruusu I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

You haven't looked at cryptoloop security, have you?

No at all.

Quoted 2 lines

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

It was just curiosity ;)
Thank you for the answer.

Signature · 4 lines
Paolo
Personal home page: www.ciarrocchi.tk
See my photos: http://paolociarrocchi.fotopic.net/
Buy cool stuff here: http://www.cafepress.com/paoloc
#9 lore raw
In reply to Jari Ruusu
Quoted 4 lines · Jari Ruusu

You haven't looked at cryptoloop security, have you?

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

Most kernel software is broken, initially -- and eventually it's either replaced with something better or tossed because no one is interested in it.

It's not clear to me whether you're more in the "offering something better" camp or the "not interested" camp. But I'm curious -- what do you see as the major issues?

Thanks,

Signature · 1 line
Raul
#10 lore raw
In reply to Jari Ruusu
Quoted 7 lines · Jari Ruusu
Quoted 3 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 15:20:43 +0300, Jari Ruusu I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

Quoted 5 lines

You haven't looked at cryptoloop security, have you?

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

Would you be happy if the code were wrapped as a general use package like blowfish, or have you decided that because one part of Linux doesn't meet your standards you don't want to allow any of your code to be used in it?

Signature · 3 lines
   -bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
 last possible moment - but no longer"  -me
#11 lore raw
Quoted 10 lines · Bill Davidsen
Quoted 9 lines · Jari Ruusu
Quoted 3 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 15:20:43 +0300, Jari Ruusu I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

You haven't looked at cryptoloop security, have you?

Quoted 8 lines
Quoted 3 lines

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

Would you be happy if the code were wrapped as a general use package like blowfish, or have you decided that because one part of Linux doesn't meet your standards you don't want to allow any of your code to be used in it?

Please check the archives, Jari's reasons are well documented. I cannot summarize the technical issues here as IANA cryptographer but please, let's not start that thread again.

Lee

#12 lore raw
Quoted 20 lines · Lee Revell
Quoted 10 lines · Bill Davidsen
Quoted 9 lines · Jari Ruusu
Quoted 3 lines · Paolo Ciarrocchi

On Mon, 04 Oct 2004 15:20:43 +0300, Jari Ruusu I understand that, I still don't understand the reaseon. But hey, feel free to ignore my question ;)

You haven't looked at cryptoloop security, have you?

Quoted 8 lines
Quoted 3 lines

No sane person wants to be accociated with that kind of broken and backdoored scam. I certainly don't.

Would you be happy if the code were wrapped as a general use package like blowfish, or have you decided that because one part of Linux doesn't meet your standards you don't want to allow any of your code to be used in it?

Quoted 3 lines

Please check the archives, Jari's reasons are well documented. I cannot summarize the technical issues here as IANA cryptographer but please, let's not start that thread again.

I'm not starting a thread, I read the discussion the first time and I'm not asking about his reasons, I'm asking a yes/no question which he will answer or not as he pleases.

Signature · 3 lines
bill davidsen <[email protected]>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
author
#13 lore raw
In reply to Jari Ruusu
Quoted 5 lines · Jari Ruusu
Quoted 4 lines · Andi Kleen
Quoted 2 lines · [email protected] (Florian Bohrer) writes:

the asm-code is from Jari Ruusu (loop-aes).
the org. glue-code is from Fruhwirth Clemens.

Quoted 8 lines
Quoted 1 line

Thanks. I will add it to the x86-64 patchkit.

Here we go again...

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Linus, please consider dropping this.

Ok, I will drop that version and go back to the older version based on the i386 code.

-Andi

#14 lore raw
Quoted 8 lines · Andi Kleen
Quoted 6 lines · Jari Ruusu

Here we go again...

Linus promised that he will not merge my code, and I am quite happy with my code not being anywhere near mainline linux cryptoapi.

Quoted 7 lines
Quoted 1 line

Linus, please consider dropping this.

Ok, I will drop that version and go back to the older version based on the i386 code.

-Andi

WHAT? We're dropping potentially better code because someone _who didn't submit it_ disagrees for personal political reasons? (Jari- I'm not questioning your reasons for not wanting to be involved in cryptoapi, but IIRC you did release that code under the GPL.)

--Andy

#15 lore raw
Quoted 5 lines · Andy Lutomirski

WHAT? We're dropping potentially better code because someone _who didn't submit it_ disagrees for personal political reasons? (Jari- I'm not questioning your reasons for not wanting to be involved in cryptoapi, but IIRC you did release that code under the GPL.)

Guys. Please remember this: don't bother with code that Jari supposedly "releases". It's simply not worth the bother.

Linus