Torture, as such, is a flagrant violation of international law. It has been outlawed by numerous treaties, conventions, and agreements to which the United States has been party. So I would argue that it is, prima facie, never justified. That said, defining precisely what torture is has been trickier than one might imagine, particularly when it comes to psychological torture and some of the so-called "enhanced interrogation" techniques that were in the news not so long ago. The other issue, which post 2 brings up, is the issue of whether torture is an effective means of extracting information. The study I link to below cites much evidence that torture is an ineffective means of getting accurate intelligence, or at least that much of the information gained under torture turns out to be false. When weighed against the costs of being a nation that consciously chooses to pursue such policies, I would argue that torture is not justified under any circumstances, including the so-called "ticking bomb" scenario.