Would a proof to the Riemann Hypothesis affect security?
Solution 1:
If by 'solution' you mean confirmation or counterexample, then no. One could just assume the result, produce an algorithm whose validity requires the Riemann hypothesis, and use it to break RSA codes. Merely knowing if the Riemann Hypothesis holds or not doesn't help you construct any factorization method (although it can tell you a theoretical bound on how well a certain algorithm can run). It is possible, however, that in the process of resolving RH, we improve our understanding of related questions/techniques and use our improved knowledge to create algorithms that do have the potential to crack RSA codes.
Most mathematicians don't want to see RH resolved just for a yes/no answer. It is more important that research into the problem produces new mathematics and deep insights -- the resolution of the problem is simply one goal to reach and a yardstick to measure our progress. The situation is similar to the development of algebraic number theory with the goal of understanding higher reciprocity laws. Along the way a whole new interesting subject opened up spawning many decades of interesting mathematics, and the original motivation no longer holds center stage.
Solution 2:
No. Practical applications can simply assume the truth of the Riemann hypothesis; proving it would increase knowledge but not itself affect security.
Solution 3:
If RH is shown to be false, it would mean that the distribution of primes has more structure than anticipated (or a different type of structure, such as unusual correlations where independence was expected) and conceivably that could be leveraged for cryptanalysis of RSA or other number theoretic codes.
If RH is shown to be true, it is likely to be as a result of proving that some symmetries or algebraic structures connected to prime numbers, structures that are presently conjectural and not precisely understood, do exist. There are such structures that exist for function fields and have applications to cryptography (Frobenius map, Weil pairings, and etale cohomology come to mind) and it's possible that the expected but currently undiscovered constructions in the number field case would also be useful for making or breaking codes.
Of course any big leap in understanding of number theory would lead to a reconsideration of number theoretic algorithms in general, especially the ones in cryptography.