The number theory that makes up the basis of cryptography was established in the 1700s. For example, Euler's theorem is the basis of RSA and was proven in 1763. The theorem is a small generalization of Fermat's little theorem which was known (but not proven) in 1640. These theorems are really just simple facts about groups and other cryptosystems, such as elliptic curve cryptosystems, are essentially the same facts except the multiplicative group of integers is replaced with an elliptic curve group.
These concepts could be taught to advanced high school students with no formal pure mathematical training. The "hot" areas in modern mathematics require not only an additional 4 years of undergraduate mathematics but usually ~2 years of a PhD program to begin to understand the current papers.
This is extremely different from other fields such as theoretical computer science which seems to have applications almost immediately. Even professional mathematicians likely do not research in hopes of applications hundreds of years later.
I will not claim that modern mathematics cannot possibly have applications. I will, however, claim that pure mathematics is an extremely poor way to allocate funds if you are simply looking for a return on investment in terms of "useful theorems proved per dollar". Mathematics research should be justified by stating that people trained in pure mathematics can be useful in industry, other applied fields or to teach mathematics.