[PATCH v7 8/9] test: lib: add test for key derivation