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