The alien and sedition acts made it a crime to criticize or publish negative things about the federalist government. This was illegal because of the 1st, 2nd, 16th, or 27th admendment
Technically the Alien and Sedition Acts were illegal because of the "First Amendment," since this guarantees the right to free speech, but they were issues under executive power--making them highly controversial.