The powers are granted by the Constitution.
There are 286,000,000 American citizens and three of them were scumbags who betrayed their country. In George Washington's day, they would have been hung.
Hamdi is an enemy combatant, his citizenship is moot. He chose to be an enemy combatant. Screw him.
If a future President begins jailing his politcal foes because of their ideology then that becomes a political question and if it gets bad enough then you lock and load.
Well, don't I feel better [/sarcasm]