chiark / gitweb /
sd-id128: add new sd_id128_get_machine_app_specific() API
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Nov 2016 16:07:46 +0000 (17:07 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
commite0e3ee7aeb2d4043149a728e431a9dda949ceed5
tree099b3448cd481f45c1339eee3ea06423c34e3e00
parent90d6a4ed9d3ef81bad45801bfebe7446ee9d08ef
sd-id128: add new sd_id128_get_machine_app_specific() API

This adds an API for retrieving an app-specific machine ID to sd-id128.
Internally it calculates HMAC-SHA256 with an 128bit app-specific ID as payload
and the machine ID as key.

(An alternative would have been to use siphash for this, which is also
cryptographically strong. However, as it only generates 64bit hashes it's not
an obvious choice for generating 128bit IDs.)

Fixes: #4667
man/sd_id128_get_machine.xml
src/libelogind/libelogind.sym
src/libelogind/sd-id128/sd-id128.c