Here is a hotlink to SAAMI's pamphlet on safe storage of gunpowder. I'll warn you in advance, it offers nothing more specific than "cool and dry."
The reason for the "cool" in "cool and dry" is that the explosive compounds in gunpowder -- which, after all, were engineered to be violently reactive -- are
so unstable, they even react with the very air around them (a process called "autocatalysed decomposition," in which explosive nitrates steal oxygens out of the air to produce nitrate esters [NO3-]). This occurs at a rate dependent on the amount of thermal energy (i.e., heat) available. And the
only temperature at which no thermal heat is available is absolute zero (or colder).
So the optimum temperature for gunpowder storage is −459.67°F or −273.15°C or 0.00°K. Absolute zero. Is that specific enough?
Fortunately, the guys who make the stuff had mercy on us and doctored those reactive compounds to improve their "thermal stability." They add temperature stabilizers, surface treatment agents, flame reducing agents and de-fouling agents, and they blend together different production batches to produce a canister-grade powder that should provide fairly consistent levels of performance, when subjected to "normal" storage conditions, for decades to come, and from lot to lot.
So if you're fretting over whether to store your powder in the 55°F basement or the 75°F hall closet, I would offer that you're using the wrong scale. All that matters is their relationship to absolute zero, so switch from Fahrenheit to Kelvin. Then 55° and 75° become 286° and 297°, and the difference goes from >25% to <4%. Plus, now we're talking the absolute level of available energy, which more directly correlates with the rate of decomposition.
Rule of thumb, any temperature you normally would expect to find in a habitable dwelling in any industrialized western nation qualifies as "cool." It bears mention that the bulk of the gunpowder maintained by the US DoD and its subsidiaries is stored in un-airconditioned bunkers.
The reason for "dry" in "cool and dry" is less about the powder than about the storage container. As long as it's tightly sealed, the powder inside could not care less what's in the air outside. But if the bottle's cheap stamped steel screw-top rusts, all bets are off.
But you are better off if you only open the bottle in a low-humidity environment. Smokeless powder is highly hydrophylic (loves to absorb water), another perk of being so extremely reactive. So if you crack the seal in a damp environment, the powder probably will gain some water weight. The change might be immeasurably small, at least at first, ...until you've opened that bottle for the 23rd time.
The net effect is that a given charge weight will contain less gunpowder and more water. As a consequence, your POIs might mysteriously be lower than expected. Or if you chronograph it, you might think the powder had lost potency, when the truth is there simply isn't as much powder in a given charge weight as there used to be. But the change is physical, not chemical. So it's reversible. Which is why I put silica gel desiccant in every newly-opened bottle of powder. The catch is that it was blended at the factory with a target potency in mind, and that potency originally included a slight amount of "original equipment" water weight. Which means that if you dry it out bone dry, an identical charge weight might produce pressures (and velocities) in excess of what the factory got when they tested that same weight. So what was a max charge weight to the boys at the factory might be a dangerous overpressure for you. YMMV. Another good reason to invest in a chrono.
As to the primers,
here is a hotlink to SAAMI's pamphlet on primer storage. And here is the salient bit, copied
verbatim from its page 3:
Modern sporting ammunition primers will not absorb moisture under normal or even severe conditions of atmospheric humidity. There is no advantage to be gained from air-tight containers. The factory containers in which they are packaged need only normal conditions of storage. They should be kept dry and not exposed to high temperatures (in excess of 150° F). If exposed to wet conditions or high temperatures, they may deteriorate, yielding misfires or poor ignition of the propellant powder.
So don't submerge it and keep it under 150°F and you're golden.