use ex_data instead of app_data for RSA
free memory in case loading key fails