ArticleslgStudy

computer science

Semantic security

Semantic security is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Semantic security rather than just read about it. In short: In cryptography, a semantically secure cryptosystem is one where only negligible information about the plaintext can be feasibly extracted from the ciphertext. Specifically, any probabilistic, polynomial-time algorithm (PPTA) that is given the ciphertext of a certain message m {\displaystyle m} (taken from any distribution of messages), and the message's length, cannot determine any partial information on the messag…

Key takeaways

  • Semantic security belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Semantic security to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Semantic security from memory before moving on to harder problems.

Reference excerpt

In cryptography, a semantically secure cryptosystem is one where only negligible information about the plaintext can be feasibly extracted from the ciphertext. Specifically, any probabilistic, polynomial-time algorithm (PPTA) that is given the ciphertext of a certain message m {\displaystyle m} (taken from any distribution of messages), and the message's length, cannot determine any partial information on the message with probability non-negligibly higher than all other PPTAs that only have access to the message length (and not the ciphertext). This concept is the computational complexity analogue to Shannon's concept of perfect secrecy. Perfect secrecy means that the ciphertext reveals no information at all about the plaintext, whereas semantic security implies that any information revealed cannot be feasibly extracted.

History The notion of semantic security was first put forward by Goldwasser and Micali in 1982.. However, the definition they initially proposed offered no straightforward means to prove the security of practical cryptosystems. Goldwasser/Micali subsequently demonstrated that semantic security is equivalent to another definition of security called ciphertext indistinguishability under chosen-plaintext attack (they used the term polynomial security). This latter definition is more common than the original definition of semantic security because it better facilitates proving the security of practical cryptosystems.

Symmetric-key cryptography In the case of symmetric-key algorithm cryptosystems, an adversary must not be able to compute any information about a plaintext from its ciphertext. This may be posited as an adversary, given two plaintexts of equal length and their two respective ciphertexts, cannot determine which ciphertext belongs to which plaintext.

Public-key cryptography

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 ( p k , s k ) {\displaystyle (pk,sk)} is generated by running G e n ( 1 n ) {\displaystyle Gen(1^{n})} . A probabilistic polynomial time-bounded adversary is given the public key p k {\displaystyle pk} , which it may use to generate any number of ciphertexts (within polynomial bounds). The adversary generates two equal-length messages m 0 {\displaystyle m_{0}} and m 1 {\displaystyle 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 ∈ { 0 , 1 } {\displaystyle b\in \{0,1\}} ), encrypts the message m b {\displaystyle m_{b}} under the public key, and returns the resulting challenging ciphertext c {\displaystyle 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 {\displaystyle 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 {\displaystyle m_{0}} and m 1 {\displaystyle m_{1}} and compare these encryptions with the returned ciphertext c {\displaystyle 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

Worked examples

Example 1 — a first encounter with Semantic security

Start with the simplest possible case. Write down what Semantic security claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Semantic security before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Semantic security ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Semantic security

In research
Semantic security appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Semantic security in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Semantic security is common in secondary-school and first-year university syllabi. It links to neighbouring topics Theory of cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for Semantic security outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Semantic security in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Semantic security means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Semantic security out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Semantic security in simple terms?

In cryptography, a semantically secure cryptosystem is one where only negligible information about the plaintext can be feasibly extracted from the ciphertext. Specifically, any probabilistic, polynomial-time algorithm (PPTA) that is given the ciphertext of a certain message m {\displaystyle m} (ta…

Why does Semantic security matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Semantic security?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Semantic security.

Tags

  • Theory of cryptography

Keep exploring