To maintain the confidentiality of private data, encryption mechanisms have become prevalent. Researchers always strive to design secure and efficient encryption mechanisms in both symmetric and asymmetric key systems. Certificate-based public key systems (CB-PKS) belong to the family of asymmetric key systems. CB-PKS offers solutions to both the key escrow problem present in identity-based public key systems, and the need to construct a public key infrastructure in traditional public key systems. The past saw a wealth of research into the encryption mechanisms in the CB-PKS, called certificate-based encryption (CBE). Indeed, encrypted data (ciphertext) can be used in other applications such as the comparison of personal medical data as two ciphertexts can be compared to determine if they contain the same data (plaintext). However, the equality test of two ciphertexts in the CB-PKS is an open issue since research which has empirically studied is scant. The purpose of this paper is to propose the first certificate-based encryption with equality test (CBEET), and to prove that it is secure under the bilinear Diffie-Hellman (BDH) assumption.