PUNISHMENT is hurting somebody by a specific amount as a measured response to some action they have been judged guilty of.
TORTURE is hurting somebody by and indefinite amount until you are either satisfied with the result or you get bored with doing it.
The Bill of Rights forbids the use of cruel and unusual PUNISHMENT but says nothing about TORTURE, probably because the founding fathers didn't figure that the law in any democratic society was concerned with what sort of TORTURE it could employ.
We sure showed them, didn't we.
