The limited storage capacity of small devices, such as mobile phone, has become a bottleneck for the development of many application, especially for security applications. The Ciphertext Policy Attributes Based-Encryption (CP-ABE) is a promising cryptographic scheme that allows encryption to choose an access structure that protects sensitive data. However, one of the problems with current CP-ABE scheme is the length of the key, whose size increases linearly with the number of attributes. In this paper, we propose a CP-ABE scheme for a constant size key. By modifying the modulus index in the key generation algorithm, the computational cost is reduced to a constant. Compared with other schemes for the literature, the private key is independent of the number of attributes. © Springer International Publishing AG 2018.