On detecting delay anomalies introduced by hardware trojans