From owner-svn-src-head@FreeBSD.ORG Thu Jul 11 16:11:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 297C1A06 for ; Thu, 11 Jul 2013 16:11:20 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8E96017D8 for ; Thu, 11 Jul 2013 16:11:19 +0000 (UTC) Received: (qmail 89975 invoked from network); 11 Jul 2013 17:01:52 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 11 Jul 2013 17:01:52 -0000 Message-ID: <51DED921.9030505@freebsd.org> Date: Thu, 11 Jul 2013 18:11:13 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r253208 - head/sys/crypto/siphash References: <201307111418.r6BEIdIo094917@svn.freebsd.org> In-Reply-To: <201307111418.r6BEIdIo094917@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 16:11:20 -0000 On 11.07.2013 16:18, Andre Oppermann wrote: > Author: andre > Date: Thu Jul 11 14:18:38 2013 > New Revision: 253208 > URL: http://svnweb.freebsd.org/changeset/base/253208 > > Log: > SipHash is a cryptographically strong pseudo-random function (a.k.a. keyed > hash function) optimized for speed on short messages returning a 64bit hash/ > digest value. ... > The number of update/finalization rounds is defined during initialization: > > SipHash24_Init() for the fast and reasonable strong version. > SipHash48_Init() for the strong version (half as fast). > > SipHash usage is similar to other hash functions: > > struct SIPHASH_CTX ctx; > char *k = "16bytes long key" > char *s = "string"; > uint64_t h = 0; > SipHash24_Init(&ctx); > SipHash_SetKey(&ctx, k); > SipHash_Update(&ctx, s, strlen(s)); > SipHash_Final(&h, &ctx); /* or */ > h = SipHash_End(&ctx); /* or */ > h = SipHash24(&ctx, k, s, strlen(s)); Looking for a man page whiz to hack one up. :) -- Andre