Both the blast and flash are products of the exothermic combustion of the propellant (gunpowder), and any remaining unburned powders reacting with ambient air.
Ingestion of the muzzle flash from aircraft-mounted guns has also been implicated in compressor stall and flameout, causing loss of aircraft.
In World War I, bags of sodium chloride (table salt) were placed in front of the propellant charges of artillery to suppress the flash.
The side effects of the alkali salts are a reduction in power, an increase in smoke, and fouling and corrosion of the firearm and nearby equipment (a significant concern with aircraft guns).
The enclosure of the silencer can also serve as a muzzle shroud to physically conceal any light emitted by the gases and residuals.