Hubbry Logo
Semantic securitySemantic securityMain
Open search
Semantic security
Community hub
Semantic security
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Semantic security
Semantic security
from Wikipedia

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 (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 PPTA's that only have access to the message length (and not the ciphertext).[1] 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.[2][3]: 378–381 

History

[edit]

The notion of semantic security was first put forward by Goldwasser and Micali in 1982.[1][4] 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.[5] 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

[edit]

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

[edit]

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:[6]

  1. A random pair is generated by running .
  2. A probabilistic polynomial time-bounded adversary is given the public key , which it may use to generate any number of ciphertexts (within polynomial bounds).
  3. The adversary generates two equal-length messages and , and transmits them to a challenge oracle along with the public key.
  4. The challenge oracle selects one of the messages by flipping a fair coin (selecting a random bit ), encrypts the message under the public key, and returns the resulting challenging ciphertext 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 (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 and and compare these encryptions with the returned ciphertext to successfully guess the oracle's choice.

The role of randomness in semantic security

[edit]

Randomness plays a key role in cryptography by preventing attackers from detecting patterns in ciphertexts. In a semantically secure cryptosystem, encrypting the same plaintext multiple times should produce different ciphertexts.[7]

If encryption relies on predictable or weak randomness, it becomes easier to break.[8] Poor randomness can lead to patterns that attackers can analyze, potentially allowing them to recover secret keys or decrypt messages. Because of this, cryptographic systems must use strong and unpredictable random values to maintain security.[9]

Why randomness is important

[edit]

Strong randomness is critical in:

Failures of randomness in the past

[edit]

Several cryptographic failures have resulted from weak randomness, allowing attackers to break encryption.

Debian OpenSSL vulnerability (2008)

[edit]

An error in Debian’s OpenSSL removed entropy collection, producing a small set of predictable keys. Attackers could guess SSH and TLS keys, allowing unauthorized access.[12]

Sony PlayStation 3 ECDSA failure (2011)

[edit]

Sony’s PlayStation 3 misused the Elliptic Curve Digital Signature Algorithm (ECDSA) by reusing the same nonce - a random number used once in cryptographic signing - in multiple signatures. Since ECDSA relies on unique nonces for security, attackers recovered Sony’s private signing key, allowing them to sign unauthorized software.[13]

ROCA vulnerability (2017)

[edit]

A flaw in Infineon's RSA key generation created weak keys that attackers could efficiently factor. This vulnerability affected smart cards and Trusted Platform Modules (TPMs), requiring widespread key replacements.[14]

How to ensure strong randomness

[edit]

To prevent such failures, cryptographic systems must generate unpredictable and high-quality random values.[15]

Use of cryptographically secure pseudorandom number generators (CSPRNGs)

[edit]

CSPRNGs provide secure random numbers resistant to attacks. Common examples include:

  • /dev/random and /dev/urandom (Unix)
  • Windows CryptGenRandom
  • NIST-approved DRBGs (Deterministic Random Bit Generators)[15]

Entropy collection

[edit]

Secure randomness requires high entropy sources, such as:

  • Hardware-based generators (e.g., Intel RDRAND)[16]
  • Physical sources, like keystroke timing[16]
  • Dedicated security hardware, including HSMs and TPMs[16]

Avoiding deterministic encryption without randomness

[edit]

Some encryption schemes require added randomness to maintain security:

  • RSA with OAEP padding introduces randomness to prevent deterministic encryption.[17]
  • Unique nonces in AES-GCM and ElGamal ensure encrypting the same message multiple times produces different ciphertexts.[17]

Testing and auditing randomness

[edit]

To verify randomness quality, cryptographic implementations should undergo:

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

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Semantic security is a cryptographic notion that defines the security of an scheme against passive adversaries who can eavesdrop on ciphertexts but cannot actively influence the process. Introduced by and Silvio Micali in their seminal 1984 paper on probabilistic , it requires that no computationally bounded adversary can learn any partial about the from the beyond what is already known from the message distribution or auxiliary . Formally, for a symmetric-key encryption scheme, semantic security holds if, for every efficient adversary A and every message distribution, there exists an efficient simulator that produces outputs indistinguishable from those of A given the , ensuring the adversary gains negligible advantage in computing any function of the . In the context of public-key , semantic is equivalently defined through the indistinguishability under (IND-CPA) game, where an adversary given the public key and a challenge for one of two chosen cannot distinguish which was encrypted with more than negligible probability. This equivalence, established in the original paper, simplifies proofs of by allowing cryptographers to use either notion interchangeably. The concept originated to address limitations of deterministic , promoting probabilistic schemes like the Goldwasser-Micali cryptosystem based on quadratic residuosity, which hides all partial information about the message. Semantic security serves as a foundational primitive in modern , underpinning secure protocols such as , zero-knowledge proofs, and hybrid encryption systems. It models realistic threats from eavesdroppers in scenarios like over public channels, but does not protect against active attacks like chosen-ciphertext scenarios, for which stronger notions like IND-CCA are required. Ongoing research extends semantic security to quantum settings and to ensure robustness against advanced adversaries.

Fundamentals

Definition

Semantic security, also known as probabilistic polynomial-time indistinguishability, is a fundamental security notion for schemes in . It ensures that an algorithm conceals all about the from an adversary who observes the , beyond what can be inferred from auxiliary already known to the attacker. Introduced by and Silvio Micali, this concept requires that the be probabilistic to prevent deterministic mappings that could leak partial details about the message. Semantically secure protects against passive adversaries who can only eavesdrop on ciphertexts, making it a cornerstone for protocols. Formally, an encryption scheme is semantically secure if, for any probabilistic polynomial-time (PPT) adversary AA, there exists a PPT simulator SS such that, for any efficient distribution over messages MM, any polynomial-time computable functions ff and hh (where hh represents auxiliary information), the difference in probabilities is negligible: Pr[A(Enc(M),h(M))=f(M)]Pr[S(h(M))=f(M)]ϵ(n),\left| \Pr\left[ A(\text{Enc}(M), h(M)) = f(M) \right] - \Pr\left[ S(h(M)) = f(M) \right] \right| \leq \epsilon(n), where ϵ(n)\epsilon(n) is a in the security parameter nn, and Enc\text{Enc} denotes the algorithm. This simulation paradigm captures the intuition that no efficient computation on the plaintext can be meaningfully advanced by access to the ciphertext. Goldwasser and Micali proved that semantic security is equivalent to the indistinguishability of encryptions under (IND-CPA), where an adversary cannot distinguish with non-negligible advantage between encryptions of two chosen plaintexts of equal length. This equivalence, later refined in subsequent works, allows for more tractable proofs using the indistinguishability game, while preserving the semantic intuition of information-theoretic hiding. Seminal constructions achieving this include the Goldwasser-Micali cryptosystem based on quadratic residuosity and under the decisional Diffie-Hellman assumption.

Formal Security Model

The formal security model for semantic security, introduced by and Micali, captures the intuition that a ciphertext should reveal no partial information about the underlying to any computationally bounded adversary, beyond what is inherent in the plaintext's length or structure. This model applies to probabilistic encryption schemes and is defined for public-key cryptosystems, where an encryption algorithm E\mathcal{E} uses a public key pkpk to produce ciphertexts that are computationally indistinguishable for different plaintexts. The security is formalized via the indistinguishability under (IND-CPA) experiment, which is equivalent to the original semantic security definition and has become the standard game-based formalism. In this two-stage game, a probabilistic polynomial-time adversary A\mathcal{A} interacts with a challenger as follows:
  1. Setup: The challenger generates a key pair (pk,sk)(pk, sk) for security parameter λ\lambda and provides pkpk to A\mathcal{A}. The adversary may query the oracle Epk()\mathcal{E}_{pk}(\cdot) adaptively on chosen plaintexts of its choice.
  2. Challenge: At some point, A\mathcal{A} submits two equal-length plaintexts m0,m1m_0, m_1. The challenger selects a random bit b{0,1}b \in \{0,1\}, computes the challenge ciphertext c=Epk(mb)c^* = \mathcal{E}_{pk}(m_b), and sends cc^* to A\mathcal{A}. The adversary continues querying the encryption but cannot query on m0m_0 or m1m_1.
  3. Guess: Finally, A\mathcal{A} outputs a guess b{0,1}b' \in \{0,1\} for bb.
The adversary's advantage is defined as AdvE,AIND-CPA(λ)=Pr[b=b]12,\text{Adv}^{\text{IND-CPA}}_{\mathcal{E},\mathcal{A}}(\lambda) = \left| \Pr[b' = b] - \frac{1}{2} \right|,
Add your contribution
Related Hubs
User Avatar
No comments yet.