PRG ⇒ Average-case hardness of NP
Statement
If a PRG with exists, is hard on average over samplable distributions. Encode the elements of injectively, by padding, as strings of one length computable from in polynomial time; for and , . An instance with has length , and is in . At a length equal to for some , takes the largest such , which it finds from in polynomial time, and outputs for or for , each with probability ; at every other length it outputs , which is not in . Since , infinitely many lengths are of the first kind, each with its own , and at each every efficient algorithm errs with probability at least , which is at least once is large, so the definition holds with — folklore.
Sketch
Fix a length of the first kind, with parameter , and let err with probability on and on for uniform , so its error under is . Since , a uniform lies in the image of with probability at most , so , while . The distinguisher that outputs exactly when accepts therefore has , so .