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

Olivier Galibert galibert at pobox.com
Fri Dec 12 02:41:28 PST 2014


  Hi,

SHA1 is easy to implement.  If you want an always-working backup, I
have a couple of C versions I wrote myself.  Libraries are only
interesting if they offer significant speedups through cpu-dependance.
Especially since the shader cache is not in the happy fun land of
hardware-based attacks (or attacks in the first place).

Best,

  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


More information about the mesa-dev mailing list