The export_key/export_iv variables are only used in the is_export case.
Also use c rather than &c[0].