Integrated Circuit Authentication: Hardware Trojans and Counterfeit Detection