[systemd-devel] Preferred library for hash functions

Daniel Parks danielrparks at gmail.com
Sun Aug 8 20:17:40 UTC 2021


I'd like to add a feature to systemd-cryptsetup that requires computing
a sha256 hash. Currently, systemd links to several different crypto
libraries, and I'm a bit confused what the preferred implementation
would be.

Currently I'm thinking about adding a dependency on libopenssl to
systemd-cryptsetup and falling back to khash if openssl is not
available at compile time, similar to the design in 
src/libsystemd/sd-id128/sd-id128.c#L285.

I do think it's slightly concerning that I would be adding another
shared library dependency to systemd-cryptsetup, but given that it
already indirectly depends on libopenssl through libsystemd-shared, I
think it should be fine.

What do other people think about this idea?

Thanks,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210808/28886383/attachment.sig>


More information about the systemd-devel mailing list