update privatekey to keymaterial