In traditional computer systems, security is typically provided in a one-or-nothing manner; the system is either secure or insecure. Such an approach is insufficient for pervasive environments that contain heterogenous devices with varying computing resources. The small, portable handheld devices are often left unsecured due to their limited computing power. The approach is also inadequate for multimedia applications that require security as a controllable service attribute to maintain performance quality of service to levels that are acceptable to the users. Hence, we need a tunable and differentiable security framework. In this paper, we present a quality of protection (QoP) framework that resolves the inadequacies of the one-or-nothing approach by providing differential security levels for different device, user and application security requirements and preferences. We show that our QoP framework is necessary for multimedia applications to achieve the best possible security and performance levels in pervasive environments.