[Mesa-dev] [PATCH] mesa: Add mesa SHA-1 functions

Olivier Galibert galibert at pobox.com
Sat Dec 20 06:21:10 PST 2014


Here is an implementation I've written myself, so no license issues.

  OG.


On Fri, Dec 12, 2014 at 10:48 AM, Jose Fonseca <jfonseca at vmware.com> wrote:
> On 11/12/14 22:02, Brian Paul wrote:
>>
>> On 12/11/2014 02:51 PM, Carl Worth wrote:
>>>
>>> From: Kristian Høgsberg <krh at bitplanet.net>
>>>
>>> The upcoming shader cache uses the SHA-1 algorithm for cryptographic
>>> naming. These new mesa_sha1 functions are implemented with the nettle
>>> library.
>>> ---
>>>
>>> This patch is another in support of my upcoming shader-cache work.
>>> Thanks to
>>> Kritian for coding this piece.
>>>
>>> As currently written, this patch introduces a new dependency of Mesa
>>> on the
>>> Nettle library to implement SHA-1. I'm open to recommendations if
>>> people would prefer some other option.
>>>
>>> For example, the xserver can be configured to get a SHA-1
>>> implementation from
>>> libmd, libc, CommonCrypto, CryptoAPI, libnettle, libgcrypt, libsha1, or
>>> openssl.
>>>
>>> I don't know if it's important to offer as many options as that, which
>>> is why
>>> I'm asking for opinions here.
>>
>>
>>
>> We'll need a solution for Windows too.  I don't have time right now to
>> do any research into that.
>
>
> Yes, ideally we'd have something small that we could bundle into mesa source
> tree, for sake of non Linux OSes.
>
> If Windows was the only concern, we could use its Crypto API,
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa382379.aspx and
> avoid depending on anything else, but some of the above mention libraries
> are not trivial to install.
>
> The other alternative is to disable shader cache when no suitable dependency
> is found. That is, make this an optional dependency.
>
> Jose
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha1.c
Type: text/x-csrc
Size: 5308 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141220/a1bd2f7b/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha1.h
Type: text/x-chdr
Size: 579 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141220/a1bd2f7b/attachment.h>


More information about the mesa-dev mailing list