I don't know what GCHQ pays for programmers or mathematicians. I imagine that Cliff Cocks (invented public key crypto before RSA) didn't get the many millions of dollars that RSA did.
So; offer an environment where people want to work. Give them interesting work. Add a dollop of patriotism.