Average-Case Complexity


Average-Case Complexity

Anna
Welcome to our discussion of average-case complexity, especially the connection between cryptography and statistical learning. The central theme is that statistical problems are defined over distributions of inputs, while traditional complexity theory has often focused on worst-case instances. That makes average-case analysis important, but also technically difficult.

Michael
And cryptography offers a useful comparison. Cryptographic security is also about distributional problems: for example, an adversary sees an encryption sampled from a distribution and should not be able to infer the hidden message. The difference is that cryptographers are usually allowed to choose the problem and the distribution they want to make hard, whereas statistical learning starts with a given distributional problem.

Anna
The workshop described several examples of this connection: random constraint satisfaction problems, pseudorandom generators, learning with errors over finite fields or the reals, planted-instance problems, neural-network learning, and gradient descent. It also included more theoretical questions involving minimum-size circuits and resource-bounded Kolmogorov complexity. A recurring goal was to understand how worst-case assumptions relate to average-case assumptions.

Michael
The talk we are focusing on studies a particularly interesting question: can we build secure public-key encryption from problems that appear to lie outside the class NP intersect coNP? Many familiar cryptographic assumptions, such as shortest independent vector and learning with errors, are associated with problems in NP intersect coNP. So the question is whether something more powerful can support encryption.

Anna
Before getting there, we need the distinction between two goals. Statistical inference tries to recover parameters of a distribution or predict new samples from it. Cryptography tries to design distributions that are hard to predict, so the goals are almost opposite.

Michael
Encryption illustrates that reversal perfectly. If an adversary sees encryptions of messages, security means the adversary should not be able to infer useful information about those messages. In statistical inference, inference is the objective; in encryption, preventing inference is the objective.

Anna
The standards of evidence also differ. Cryptography generally wants security against every efficient algorithm an adversary might use. Statistical inference often studies restricted but meaningful algorithmic models, such as polynomial methods or statistical-query algorithms. Those models reveal different aspects of hardness, but they do not automatically establish hardness against all algorithms.

Michael
A major foundational dream is to base secure cryptography on the assumption that P does not equal NP. If P equaled NP, the talk argues, cryptography would not be possible. But moving from that assumption to encryption requires overcoming multiple barriers.

Anna
The first barrier is moving from worst-case hardness to average-case hardness. Even that has two forms. Refutation hardness concerns an algorithm that is always correct but may answer 'I don't know' on some fraction of instances. Heuristic hardness allows an algorithm to be wrong sometimes but requires it to be correct on a sufficiently large fraction.

Michael
The second barrier is moving from average-case hardness to secure cryptography. The talk sets aside much of the first barrier because work on minimum time-bounded Kolmogorov complexity showed a surprising worst-case-to-average-case result for a problem believed to be in NP but not coNP. That overcame several previously proposed obstacles, even though it did not directly produce cryptography.

Anna
The focus, then, is the second barrier: what kinds of encryption can be broken if we have an oracle for statistical zero knowledge, or SZK? SZK is a convenient class because it has a clean complete problem and captures much of the structure of problems inside NP intersect coNP.

Michael
The interactive definition of SZK uses a prover and verifier. The verifier learns nothing about the interaction in a statistical sense: whatever the verifier observes can be simulated independently, with a statistically close distribution. So the transcript reveals no meaningful additional information.

Anna
There is also a complete-problem characterization. Given two circuits that sample distributions A and B, the task is to determine whether those distributions are statistically close or statistically far apart. An oracle for this problem can therefore be used whenever we can construct two samplers whose closeness depends on the hidden property we want to discover.

Michael
The first encryption example is ElGamal. Let G be a group generator, let the secret key be a random exponent, and let the public key be G raised to that exponent. To encrypt a message, choose random r and output the pair consisting of G raised to r and the message multiplied by the public key raised to r.

Anna
To decrypt, the secret exponent removes the public-key contribution, recovering the message. But the important feature here is re-randomization. Given a ciphertext, raise both components to an additional random power. If the original ciphertext encrypted one message, the result is distributed like a fresh encryption of that message.

Michael
Now compare two samplers. One sampler re-randomizes the given ciphertext. The other directly produces fresh encryptions of message one. If the ciphertext encrypted message one, the distributions are the same. If it encrypted message two, the distributions are far apart, so the statistical-distance oracle distinguishes them.

Anna
That argument extends beyond ElGamal. Any re-randomizable encryption scheme can be attacked using the statistical-distance oracle. The talk also notes that homomorphic encryption schemes can be shown to be re-randomizable, so supporting too much functionality can make a scheme unsuitable as a candidate for encryption based only on a very strong complexity assumption.

Michael
The second example is Regev's learning-with-errors encryption. In the LWE assumption, a random matrix is multiplied by a secret vector and noise is added. The resulting noisy linear combinations are supposed to be computationally indistinguishable from completely random values.

Anna
The statistical-distance oracle can distinguish those cases through a geometric construction. Consider the span of the columns of the random matrix and the span obtained after adding the noisy vector. Under the noisy-linear-combination hypothesis, the spans are close; under the fully random hypothesis, they are far.

Michael
Adding carefully chosen noise to samples from those spans makes the two resulting distributions statistically close in the first case but statistically far in the second. Distinguishing the distributions therefore distinguishes the LWE alternatives. A search-to-decision reduction then recovers the secret key, which breaks the encryption.

Anna
The third example is the Alekhnovich encryption scheme over the two-element field. Its public key contains a random matrix and a noisy random linear combination of its rows. Encryption of zero uses a vector from the dual space of the matrix, together with extra noise; encryption of one uses a completely random vector.

Michael
Decryption works because the secret key interacts differently with those two cases. For an encryption of zero, the dual-space component vanishes, leaving the inner product with the noise. For an encryption of one, the secret key is paired with something random. The parameters must create a noticeable gap between these two outcomes.

Anna
That gap requires the relevant noise supports to be typically disjoint. If both noise probabilities are larger than about one over the square root of the dimension, collisions become likely. But at the threshold of roughly one over square root of the dimension, the statistical-distance oracle can distinguish the cases.

Michael
The reason is that adding extra bit-flipping noise changes the distribution in different ways. In one case, adding a vector with about the square-root-of-the-dimension scale is within the normal fluctuation of the distribution, so the result remains statistically close. In the random case, the number of ones shifts substantially, making the distributions far apart.

Anna
The fourth example concerns continuous LWE, introduced in connection with learning mixtures of Gaussians. A sample consists mostly of continuous Gaussian coordinates, except for one hidden direction containing a slightly thickened discrete Gaussian. A random rotation hides that special direction, and the resulting samples are conjectured to be computationally indistinguishable from fully continuous Gaussian samples.

Michael
This assumption can be used to describe a simplified Ajtai-style encryption scheme. The public key is a matrix of such samples, and the hidden direction is the secret key. To encrypt zero, multiply the public-key matrix by a random plus-or-minus-one vector and round the result. To encrypt one, use an independent Gaussian vector and round it in the same way.

Anna
Decryption projects onto the hidden direction. For an encryption of zero, the projection is close to an integer because the hidden component of each public-key sample is close to an integer. For an encryption of one, the projection behaves like a Gaussian and is generally not close to an integer.

Michael
The rounding divides the real line into polynomially many intervals, each having approximately the same Gaussian weight, and maps every value to its interval label. This rounding has a pseudorandomness property: if the public matrix were purely Gaussian rather than containing the hidden discrete direction, rounded encryptions of zero and one would be statistically close.

Anna
That property gives an SZK protocol for distinguishing a genuine public-key matrix from a random matrix. The verifier encrypts a random message using the matrix and asks the prover to reveal the message. If the matrix is genuine, the prover can decrypt and answer correctly. If it is random, encryptions of zero and one are statistically close, so the prover cannot reliably tell which message was used.

Michael
The protocol is statistically zero knowledge because, in the genuine case, the verifier already knows the message it chose and therefore knows what answer the prover is expected to return. The talk establishes that the continuous-LWE problem lies in SZK, although turning this directly into a complete break of the encryption requires additional work.

Anna
The broader lesson is that several assumptions used in encryption—including LWE-related assumptions and problems derived from worst-case lattice problems—can fall inside statistical zero knowledge when examined through the mechanics of their encryption schemes. That suggests they may not be strong enough to support encryption from an assumption as broad as P not equal to NP.

Michael
But this is not a complete survey. The speaker did not determine whether factoring-based encryption or code-based encryption such as McEliece can be broken using the same approach. Also, asking whether an average-case problem is hard for SZK is subtle, because one must specify a natural distributional version of the SZK problem.

Anna
The final speculation connects SZK to statistical-computational gaps. Problems such as planted clique are in NP because one can prove that a particular clique exists, but they are not known to have SZK protocols. Since SZK is closed under complements, a successful SZK proof for one side would automatically provide a corresponding refutation for the other side.

Michael
Random three-SAT illustrates why access to stronger complexity resources can change the picture. At low clause density, formulas are satisfiable, so refuting them is inappropriate. At sufficiently high density, efficient certification algorithms exist. In an intermediate range, work by Feige, Kim, and Ofek showed that access to an NP-style oracle can provide certificates that extend refutation beyond what is known efficiently.

Anna
This motivates asking whether SZK or other oracles similarly change the apparent hardness of planted problems, random constraint systems, or learning problems. One approach is to build an encryption scheme and see whether breaking it places the underlying problem in SZK. Another is to construct statistical zero-knowledge protocols directly.

Michael
So the episode's main message is a two-way connection. Cryptography supplies distributional problems and reductions that illuminate statistical inference, while statistical complexity classes such as SZK can reveal limitations of cryptographic constructions. Studying which encryption schemes can be broken by SZK helps map the boundary between average-case hardness, learning hardness, and secure cryptography.

Ask anything
We've read this whole study set, so questions about it get the best answers.