Re: BSD license compatible hash algorithm?

2007-12-31 Thread Dag-Erling Smørgrav
Aryeh M. Friedman [EMAIL PROTECTED] writes: Dag-Erling Smørgrav [EMAIL PROTECTED] writes: Aryeh M. Friedman [EMAIL PROTECTED] writes: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... btw it is a old wives tale that the number of buckets

Re: BSD license compatible hash algorithm?

2007-12-30 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dag-Erling Smørgrav wrote: Aryeh M. Friedman [EMAIL PROTECTED] writes: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... btw it is a old wives tale that the number of buckets should be prime (mostly

Re: BSD license compatible hash algorithm?

2007-12-30 Thread perryh
Aryeh M. Friedman [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dag-Erling Sm??rgrav wrote: Aryeh M. Friedman [EMAIL PROTECTED] writes: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... btw it is a old wives tale

Re: BSD license compatible hash algorithm?

2007-12-29 Thread Dag-Erling Smørgrav
Aryeh M. Friedman [EMAIL PROTECTED] writes: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... btw it is a old wives tale that the number of buckets should be prime (mostly based on the very weak implementation Knuth offered) Not an old wives' tale,

Re: BSD license compatible hash algorithm?

2007-12-29 Thread Edward B. DREGER
GC Date: Thu, 27 Dec 2007 16:34:32 -0800 GC From: Garrett Cooper GC On Dec 27, 2007, at 4:30 PM, Garrett Cooper wrote: GC GC Just wondering if anyone knew of a good BSD license compatible GC key-based hash placement / retrieval algorithm that was available GC anywhere. GC GC 1. It needs to be

Re: BSD license compatible hash algorithm?

2007-12-29 Thread Peter Jeremy
On Sat, Dec 29, 2007 at 08:50:14PM +, Edward B. DREGER wrote: ...have you explored [order-preserving] minimal perfect hash functions? perfect_hash = ( hash1[x] + hash2[x] ) % entry_count ; This relies on pre-knowledge of all possible entries. It's excellent for (eg) keyword lookups in a

Re: BSD license compatible hash algorithm?

2007-12-29 Thread Edward B. DREGER
PJ Date: Sun, 30 Dec 2007 08:35:21 +1100 PJ From: Peter Jeremy PJ On Sat, Dec 29, 2007 at 08:50:14PM +, Edward B. DREGER wrote: PJ PJ perfect_hash = ( hash1[x] + hash2[x] ) % entry_count ; PJ This relies on pre-knowledge of all possible entries. It's PJ excellent for (eg) keyword lookups

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Diomidis Spinellis
Garrett Cooper wrote: On Dec 27, 2007, at 4:30 PM, Garrett Cooper wrote: Hi all, Just wondering if anyone knew of a good BSD license compatible key-based hash placement / retrieval algorithm that was available anywhere. I'm looking for a reliable way to lookup objects to see if a

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Ivan Voras
Garrett Cooper wrote: Looks promising, but how difficult would it be to port the code to other platforms (Win32 for instance?). The hash algorithm itself as implemented in hash.h is pretty much a text-book hash algorithm (D.J.Bernstein's): #ifndef HASHINIT #define HASHINIT5381

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Ivan Voras
On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: Matter of fact this weakness is the main avenue of attack on cryptographic hashes see http://eprint.iacr.org/2004/199.pdf A slightly off topic side note NIST is having a contest to attempt to mitigate these issues in SHA-3 see:

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan Voras wrote: Garrett Cooper wrote: Looks promising, but how difficult would it be to port the code to other platforms (Win32 for instance?). The hash algorithm itself as implemented in hash.h is pretty much a text-book hash algorithm

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... btw it is a old wives tale that the number of buckets should be prime (mostly based on the very weak implementation Knuth offered) Forgot to mention

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Ivan Voras
On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... Here's a more direct link: http://www.burtleburtle.net/bob/hash/doobs.html This one is much better according to

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan Voras wrote: On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: Depends on the size of the table... I work with a algrothem that regularly has tables between 2^32 and 2^64 buckets (even though the we use a slightly different

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan Voras wrote: On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... Here's a more direct link: http://www.burtleburtle.net/bob/hash/doobs.html

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Aryeh M. Friedman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ivan Voras wrote: On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: Matter of fact this weakness is the main avenue of attack on cryptographic hashes see http://eprint.iacr.org/2004/199.pdf A slightly off topic side note NIST is having a

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Sean C. Farley
On Fri, 28 Dec 2007, Ivan Voras wrote: On 28/12/2007, Aryeh M. Friedman [EMAIL PROTECTED] wrote: All hashs have issues with pooling see http://www.burtleburtle.net/bob/hash/index.html... Here's a more direct link: http://www.burtleburtle.net/bob/hash/doobs.html This one is much better

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Garrett Cooper
On Dec 28, 2007, at 4:35 AM, Ivan Voras wrote: Garrett Cooper wrote: Looks promising, but how difficult would it be to port the code to other platforms (Win32 for instance?). The hash algorithm itself as implemented in hash.h is pretty much a text-book hash algorithm

Re: BSD license compatible hash algorithm?

2007-12-28 Thread Peter Jeremy
On Fri, Dec 28, 2007 at 06:32:21PM -0800, Garrett Cooper wrote: Anyhow, thanks for the ideas I really do appreciate it. Overall, I think I will stick with BDB's hash(3) (seems less data collision prone, as was pointed out earlier, and less of a security risk) as I wasn't aware of the NULL

BSD license compatible hash algorithm?

2007-12-27 Thread Garrett Cooper
Hi all, Just wondering if anyone knew of a good BSD license compatible key- based hash placement / retrieval algorithm that was available anywhere. I'm looking for a reliable way to lookup objects to see if a given action would be performed in my revised pkg_install(1), to thus efficiently

Re: BSD license compatible hash algorithm?

2007-12-27 Thread Garrett Cooper
On Dec 27, 2007, at 4:30 PM, Garrett Cooper wrote: Hi all, Just wondering if anyone knew of a good BSD license compatible key- based hash placement / retrieval algorithm that was available anywhere. I'm looking for a reliable way to lookup objects to see if a given action would be

Re: BSD license compatible hash algorithm?

2007-12-27 Thread Brooks Davis
On Thu, Dec 27, 2007 at 04:30:40PM -0800, Garrett Cooper wrote: Hi all, Just wondering if anyone knew of a good BSD license compatible key-based hash placement / retrieval algorithm that was available anywhere. I'm looking for a reliable way to lookup objects to see if a given

Re: BSD license compatible hash algorithm?

2007-12-27 Thread Garrett Cooper
On Dec 27, 2007, at 4:37 PM, Brooks Davis wrote: On Thu, Dec 27, 2007 at 04:30:40PM -0800, Garrett Cooper wrote: Hi all, Just wondering if anyone knew of a good BSD license compatible key-based hash placement / retrieval algorithm that was available anywhere. I'm looking for a reliable

Re: BSD license compatible hash algorithm?

2007-12-27 Thread Brooks Davis
On Thu, Dec 27, 2007 at 04:47:26PM -0800, Garrett Cooper wrote: On Dec 27, 2007, at 4:37 PM, Brooks Davis wrote: On Thu, Dec 27, 2007 at 04:30:40PM -0800, Garrett Cooper wrote: Hi all, Just wondering if anyone knew of a good BSD license compatible key-based hash placement / retrieval