Bug 79794

Summary: Glyph HashMap uses sha1 hash, depends on external crypto library
Product: xorg Reporter: Marek Behun <kabel>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED INVALID QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Marek Behun 2014-06-08 13:45:38 UTC
The functions in xserver/render/glyph.c (and also in render.c) use external crypto library sha1 algorithm for a HashMap (of glyphs). This is the only occurance of x_sha1_* usage in xserver.

The x_sha1_* functions depend on external library (of packager choosing: openssl/libgcrypt/libnettle/other). 300 lines of code only to wrap external library calls. In those 300 lines one could write some simpler, faster hashmap hash function (isn't crc32 or something simpler good enough for this?), or one could copy the entire code for sha1 from another library.

Depending on external crypto library because of a hashmap is insane for Christ's sake.
Comment 1 Adam Jackson 2018-06-13 18:54:48 UTC
People who actually ship software routinely want to minimize the number of cryptographic implementations they ship. A patch to use some explicitly non-cryptographic hash algorithm might be entertained, but it's the way it is presently for a reason.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.