How to calculate the cost of factoring a large integer?
To turn the question around, one could equivalently ask: "How large must my prime be in order to be secure until year X against the resource plausibly available to a potent (e.g. government-funded) attacker?" This question is being regularly reassessed in various studies yielding recommended key lengths for crypto systems. A regularly updated web page summarizing these reports can be found here.