Hash based key derivation impl + tests.