您的位置:首页 > 其它

Daniel J. Bernstein其人其事

2008-07-18 14:41 459 查看

Daniel J. Bernstein其人其事

最近在研究的shellcode的API动态定位的问题,为了提高效率和缩短shellcode的长度采用了hash值来代替函数名来进行查找,于是对比研究了一些字符串哈希函数,我发现不约而同的,几乎所有的流行的hash map都采用了DJB hash function,俗称“Times33”算法。Perl、Berkeley DB 、Apache、MFC、STL 等等。times33的算法也很简单,就是不断的乘33。nHash = nHash*33 + *key++; Time33在效率和随机性两方面上俱佳。对于一个Hash 函数,评价其优劣的标准应为随机性,即对任意一组标本,进入Hash表每一个单元(cell)之概率的平均程度,因为这个概率越平均,数据在表中的分布就越平均,表的空间利用率就越高。
这个算法的提出者Daniel J. Bernstein,他现在是美国Illinois 大学 Chicago 分校数学教授,是著名的密码学研究专家, 他也是qmail(因特网邮件传送代理)的编写者。Wikipedia上对他的说明是:“Daniel Julius Bernstein (sometimes known simply as djb; born October 29, 1971) is a professor at the University of Illinois at Chicago, a mathematician, a cryptologist, and a programmer. Bernstein is the author of the computer software qmail, publicfile and djbdns. He has a Bachelor's degree in Mathematics from New York University (1991), and a PhD in Mathematics from the University of California, Berkeley (1995),”
Daniel J. Bernstein最著名的就是他关于密码术源代码的出版问题对美国政府的诉讼,当他还是柏克莱加州大学的研究生时,针对密码软件与硬件的出口管制发起了对美国政府的法律诉讼,以言论自由挑战禁令的某些观点。1995年的Bernstein v. United States案例促成了在1999年判决印出密码算法的原始码属美国宪法言论自由保障范围内。
下面是在Wikipedia上查出的关于这次诉讼的详细情况
Bernstein v. United States is a set of court cases brought by Daniel J. Bernstein challenging restrictions on the export of encryption software outside the United States.

The case was first brought in 1995, when Bernstein was a student at University of California, Berkeley, and wanted to publish a paper and associated source code on his Snuffle encryption system. Bernstein was represented by the Electronic Frontier Foundation, who hired outside lawyer Cindy Cohn. After four years and one regulatory change, the court case won a landmark decision from the Ninth Circuit Court of Appeals, that software source code was speech protected by the First Amendment and that the government's regulations preventing its publication were unconstitutional. [1]

The government modified the regulations again, substantially loosening them, and Bernstein, now a professor at the University of Illinois at Chicago, challenged them again. This time, he chose to represent himself, although he has no formal legal training. On October 15, 2003, almost nine years since Bernstein first brought the case, the judge dismissed it and asked Bernstein to come back when the government made a "concrete threat". [2]





上图就是NBDaniel J. Bernstein的照片,还是很cool的哦。
附录:
// DJB Hash Function
//It is one of the most efficient hash functions ever published.
unsigned int DJBHash(char *str)
{
unsigned int hash = 5381;
while (*str)
{
hash += (hash << 5) + (*str++);
}
return (hash & 0x7FFFFFFF);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: