[PATCH v3 5/5] test: lib: add test for key derivation