No target is 100% secure. There is a reason those ships are so far out.
Needless to say, Iran attacking a US aircraft carrier would result in massive outrage in the states, would actually harden domestic opinions regarding the war and galvanize support against Iran mong NATO members.
For now the support for the war back in the states is like warm at best. This would change overnight, many in the intl. Media still share news articles highlighting the plight of the Iranians, this would change overnight when caskets of American personnel are seen on screens.
Attacking a US Navy vessel in any spectacular fashion would be highly counter productive to Iran and it's interests.