KEYMGMT: Add a keydata copy function