Barry. Yoru comments are technically correct since the Geneva Conventions were written before terrorism became the preferred tactic of some. Tho there is also a strong argument that in any civil war (e.g. US Civil War), the non-government factions can be labelled terrorist in that they are not part of a unified/uniformed army (such as unaffiliated milita groups).
Regardless of the technicality, the Geneva Conventions were written about respecting human dignity even during conflict. This basic premise of Humanity precludes the use of torture. Basic human rights of rights to food, dignity and respect need to be given even if the person being detained did not offer this to others.
human ... humane
inhuman - inhumane
Being inhumane to other humans drops us down the evolutionary chain significantly rather than growing. "Justified" inhumanity is still inhuman.