Bug 79794 - Glyph HashMap uses sha1 hash, depends on external crypto library
Summary: Glyph HashMap uses sha1 hash, depends on external crypto library
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-08 13:45 UTC by Marek Behun
Modified: 2018-06-13 18:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.