For an
asymmetric key encryption algorithm cryptosystem to be semantically secure, it must be infeasible for a
computationally bounded adversary to derive significant information about a message (plaintext) when given only its
ciphertext and the corresponding public encryption key. Semantic security considers only the case of a "passive" attacker, i.e., one who generates and observes ciphertexts using the public key and plaintexts of their choice. Unlike other security definitions, semantic security does not consider the case of
chosen ciphertext attack (CCA), where an attacker is able to request the decryption of chosen ciphertexts, and many semantically secure encryption schemes are demonstrably insecure against chosen ciphertext attack. Consequently, semantic security is now considered an insufficient condition for securing a general-purpose encryption scheme. Indistinguishability under
Chosen Plaintext Attack (
IND-CPA) is commonly defined by the following experiment: • A random pair (pk,sk) is generated by running Gen(1^n). • A probabilistic polynomial time-bounded adversary is given the public key pk , which it may use to generate any number of ciphertexts (within polynomial bounds). • The adversary generates two equal-length messages m_0 and m_1, and transmits them to a challenge oracle along with the public key. • The challenge oracle selects one of the messages by flipping a fair coin (selecting a random bit b \in \{0,1\}), encrypts the message m_b under the public key, and returns the resulting
challenging ciphertext c to the adversary. The underlying
cryptosystem is IND-CPA (and thus semantically secure under chosen plaintext attack) if the adversary cannot determine which of the two messages was chosen by the oracle, with probability significantly greater than 1/2 (the success rate of random guessing). Variants of this definition define indistinguishability under
chosen ciphertext attack and
adaptive chosen ciphertext attack (
IND-CCA,
IND-CCA2). Because the adversary possesses the public encryption key in the above game, a semantically secure encryption scheme must by definition be
probabilistic, possessing a component of
randomness; if this were not the case, the adversary could simply compute the deterministic encryption of m_0 and m_1 and compare these encryptions with the returned ciphertext c to successfully guess the oracle's choice. Semantically secure encryption algorithms include
Goldwasser-Micali,
ElGamal and
Paillier. These schemes are considered
provably secure, as their semantic security can be reduced to solving some hard mathematical problem (e.g.,
Decisional Diffie-Hellman or the
Quadratic Residuosity Problem). Other, semantically insecure algorithms such as
RSA, can be made semantically secure (under stronger assumptions) through the use of random encryption padding schemes such as
Optimal Asymmetric Encryption Padding (OAEP). ==References==