SEC: add generic interface for key-derivation functions.