Depending on the proof of P=NP and what you mean by "easily". In TCS, anything polynomial is considered "easily" so it could easily be the case that some ridiculous polynomial is implied with some ridiculous constants.
Suppose the proof of P=NP were not constructive, then Levin's universal search algorithm automatically gives us an algorithm that finds the factors in polynomial time. This would satisfy some definition of "easily" from above. However, if you take a look at Levin's universal search, it quickly becomes apparent the constants involved are truly galactic and not worth even thinking about in a practical sense.
If the proof of P=NP were constructive but gave some incredibly high degree polynomial or something with incredibly high constants, then we might be more wary. We would be able to get factors in polynomial time but it would still be "hard" in a practical sense to get the private key but it becomes exceedingly difficult to guarantee that there isn't some practically efficient algorithm. Proving fine grained lower bounds like this has been difficult to say the least.
If the proof of P=NP were constructive and efficient, then we would easily be able to get the private key. There is some additional detail here about what NP complete problem was actually solved (and thus how much the polynomial reduction cost but this is typically small) but this is a bit detailed and unclear. We would also probably begin searching for a directly efficient factoring algorithm.
This is a total laymans perspective, but: I've never figured how we could get an algorithm that's O(n^1000) or whatever other constant exponent for general problems like NP. n^2 algorithms are a dime a dozen, n^3 isn't super uncommon either, but what magic trick would confine the exponent to anything constant for a class of algorithms where n is unbounded and there's otherwise no other number in it to derive that from?