This analysis from former CIA analyst Ray McGovern is as clear as anything I have seen:
"Dark-side" operations, using "any means at our disposal" -- like, say, "enhanced interrogation techniques" -- by law require a "finding" signed by the president. Before signing, Bush would have sought the advice of his White House Counsel Alberto Gonzales -- the more so, since this particular finding raised serious questions with regard not only to international law but also to US criminal statutes, and particularly the War Crimes Act of 1996 (18 U.S.C. 2441).
Enter the (in)famous memorandum of January 25, 2002, from Gonzales to the president, in which some provisions of the Geneva Conventions on prisoners of war were described as "quaint" and "obsolete." Referring to the US War Crimes Act, the author of that memorandum argued that there was a "reasonable basis in law" that Bush could escape future criminal prosecution for violating that law...
And so, on February 7, 2002, Bush signed the watershed memorandum telling our armed forces "to treat detainees humanely and, to the extent appropriate and consistent with military necessity, in a manner consistent with the principles of Geneva." Therein lies the gaping loophole that largely accounts for the widespread practice of torture of the kind so graphically represented in the photos from Abu Ghraib. It was not a "few bad apples" at the bottom. The bad apples were at the very top of the barrel.