Lots of misinformation here. Typically, flash powders use oxidizers that are perchlorates which are less shock sensitive than chlorates. Regulation of them for shipping is by controlling quantities per package and the type of packaging. This is the same, in principle, as shipping primers, which also have shock sensitivity.
ALL gunpowder deflagrates in a gun, regardless of whether it is made of substances that are normally low explosive like black powder, or if is made of substances that are normally high explosives, like nitrocellulose and nitroglycerin, as smokeless powder is. The line between high and low explosive is fuzzy because even normally low explosives like black powder can detonate like a high explosive in great enough quantity and a strong enough initiator (tons, for black powder, IIRC, with dynamite initiator) to carry an intense enough shock wave to release energy. The more sensitive an explosive is, generally speaking, the smaller the minimum quantity for detonation is. In a firearm, detonation of smokeless powder cracks the steel by creating local pressures that can momentarily exceed half a million psi. So unless the gun shatters, you haven't seen detonation occur inside of it.
High explosive can deflagrate as long as no pressure wave strong enough to detonate it develops in the material.
Blasting powder is identical to black powder, except sodium nitrate replaces potassium nitrate because it is less expensive. The large quantities used in blasting a rock or a pit or even a tree stump is enough heat that the higher moisture content caused by the greater hygroscopic tendencies of sodium nitrate are overcome by the heat generated, where a gun may fail to fire a round with satisfactory accuracy and velocity consistency using variable water content powder. I was told decades ago that blasting powder used in mining had been replaced by charcoal and liquid oxygen. This mixture has the advantage that if a charge fails to explode, the miners just wait awhile for the LOX to evaporate and then it is safe to go see what went wrong.
The concern about a shock-sensitive powder in a firearm is that all powders exhibit exponential pressure increases as the charge quantity is increased. For black powder and smokeless powder this is very predictable, but they are made with grain size and surface area and geometry control to keep this safe to work with. The exponents are not too high. With a shock-sensitive powder the exponent can be much higher so that a modest increase in powder quantity can produce a greater incremental pressure increase than is expected during a normal gradual load work-up. The potential to reach a detonating pressure is also there with a sensitive, even though that doesn't normally occur. The perchlorates will also produce corrosive salt residue that can easily start rust forming if the relative humidity is above about 30%. So there is risk in this to both gun and shooter.
I thought I had closed this thread earlier and asked people to take the discussion to Private Messaging. Something went wrong. Let's fix that now. Insults are starting be made and that's a pretty good sign we have been baking too long.