deriveKey method relocation from AppData class to KeyDerive class