Re: RFC: Established connections hash function

2007-03-27 Thread Nikolaos D. Bougalis
Andi Kleen ([EMAIL PROTECTED]) wrote: To truly defend against this you would likely need a cryptographic hash, which would be likely too slow. I do not think that a cryptographically secure hash is necessary for this. Using a better hash function (i.e. one which does a good job of

Re: RFC: Established connections hash function

2007-03-23 Thread Nikolaos D. Bougalis
Let me start off by saying that I hope I didn't come across as condenscending in my previous posts. If I did, then it wasn't intended. Now, on to more important things :) jhash_2words(const, const, ((const 16) | $sport) ^ $random) where $sport is 1-65535 in a loop, and $random is

Re: XOR hash beauty solved [Was: RFC: Established connections hash function]

2007-03-23 Thread Nikolaos D. Bougalis
So, briefly saying, jhash_2/3words have safe distribution, but have higher-number of elements waves as a result of folding which is unavoidable for general-purpose hash. Thanks for the analysis. -n - To unsubscribe from this list: send the line unsubscribe netdev in the body of a

RFC: Established connections hash function

2007-03-22 Thread Nikolaos D. Bougalis
Hello, I have noticed that the hash function that the kernel uses for established TCP/IP connections is rather simplistic, specifically: h = (local address ^ local_port) ^ (remote_address ^ remote_port); h ^= h 16; h ^= h 8; Now, simple is great, but this has a number of

Re: RFC: Established connections hash function

2007-03-22 Thread Nikolaos D. Bougalis
On Thu, March 22, 2007 at 8:52 AM, Evgeniy Polyakov [EMAIL PROTECTED] wrote: It seems you do not know a history... I know a lot about history. I may not know the specific history you had in mind though. I do see now that this has been brought up before. Before posting, I did search

Re: RFC: Established connections hash function

2007-03-22 Thread Nikolaos D. Bougalis
On Thu, Mar 22, 2007 11:21 AM, Evgeniy Polyakov [EMAIL PROTECTED] wrote: Utterly broken? Nonsense. I have tested the actual function I proposed (sans the __force and __u32 stuff, which weren't necessary in my test program), against real data, collected from various servers in real-time. It

Re: RFC: Established connections hash function

2007-03-22 Thread Nikolaos D. Bougalis
We started our discussion a bit wrong - let's start it again, ok? :) Fair enough. You do not want to read what was written - _if_ we use artificial data, then attacker can use it too, so if it is possible to break the system with artificial data, then it is possible it will be broken in