Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2013 18:11:13 +0200
From:      Andre Oppermann <andre@freebsd.org>
To:        Andre Oppermann <andre@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r253208 - head/sys/crypto/siphash
Message-ID:  <51DED921.9030505@freebsd.org>
In-Reply-To: <201307111418.r6BEIdIo094917@svn.freebsd.org>
References:  <201307111418.r6BEIdIo094917@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51DED921.9030505>