Selective encryption is a new trend in content protection. It aims at reducing the amount of data to encrypt while achieving a sufficient and inexpensive security. This approach is particularly desirable in constrained communication (real time networking with delay constraints, mobile communication with limited computational power...). In this paper we introduce selective encryption from information theory point of view. We define a set of evaluation criteria for selective encryption algorithms and propose a novel selective encryption algorithm for JPEG2000 compressed images satisfying all these criteria. The main contribution of this proposal consists of reaching the minimum amount of data to encrypt regarding a given level of security and target application requirements. For this purpose, we exploit the R-D optimization performed by JPEG2000 EBCOT algorithm.