Ali Larijani, the Secretary of the Supreme National Security Council of Iran, has a complex political legacy and uncertain future.