First, the concept of the Semantic Security means the knowledge of the ciphertext of unknown message does not reveal any additional information on the message. The indistinguishablility under chosen plaintext attack is defined as follows:
1. Using KeyGenerate() to generate a random pair (PublicKey, PrivateKey)
2. An adversary is given the PublicKey and generates two equal-length messages m0 and m1, and transmits them to the oracle along with the PublicKey.
3. The oracle randomly selects one of the m0 and m1, and encrypts the chosen plaintext under the PublicKey.
4. The oracle returns the ciphertext to the adversary, but the adversary is not able to determine which of the two messages was chosen by the oracle.