Torture is certainly distasteful. Everyone would admit that. And certainly, torture for torture’s sake is to be totally repudiated. But what about the mass murder of 3000 innocent people? And what if the only means of preventing that would have been from information received by waterboarding? What would you say to that? Is it really that clear to you that pain and/or discomfort inflicted, with no lasting psychological or physical damage, on a murderer is not justified if it is for the greater good? It shouldn’t be. Certainly the saving of countless innocent lives is for the greater good. God himself allowed far worse torture on his own Son for the greater good. Are you going to tell God that He is wrong?
As far as waterboarding being illegal, there have been investigations into that very question. The findings have not determined that this action is illegal.