Considering the existence of fast implementation methods for multiplication operations over ideal lattices, we constructed a selectively secure ciphertext policy attribute-based encryption scheme supporting Boolean circuits based non-monotonic linear secret sharing scheme. It uses the trapdoor generation algorithm TrapGen to generate the public parameters and the preimage sampling algorithm SamplePre to embed the public parameters and randomness into the user’s secret key, which achieves the randomization of the secret key. The sharing and reconstruction of the secret in the encryption and decryption algorithm are achieved by a non-monotonic linear secret sharing scheme. Compared to the existing ciphertext policy attribute-based encryption schemes based on a similar sampling algorithm, the size of the ciphertext is significantly reduced.