main_generate_keys(): reject key_type=password
rename main_write_dh_key() to main_write_key()
main_read_key_type(): change error prefixes from main_read_key to main_read_key_type