Gunpowder or black powder is made from potassium nitrate and charcoal. The charcoal is considered as the fuel and the potassium is the oxidizing agent. When adding the sulfur to the previous components the gun powder becomes so strong and allow the burning materials to ignite easier with low temperature.
The Chinese were the first to discover the gun powder. At 140 AD in China an alchemist Wei Boyang noticed that when flaming the mixture of black powder it creates an explosion.
At the beginning the Chinese physicians used the gun powder to treat the skin diseases, then it was used in the fireworks in the celebrations. The use of gun powder as a weapon came later in the 9th or 10th century, in the form of the first rocket invented by the Chinese that till today it is the base of all rockets.
From China, gunpowder and rockets were used against the Mongols, which were the enemies of the Chinese. Then they were transferred to the Middle East by the Mongols whom learned about it from the Chinese, then it moved over to Europe.
Then later the canon, the mine and the firearms were invented. In the 13th century the European started using the gun powder in the military applications as firepots.
In the 15th century the European gunpowder industry has reached a mixture of gunpowder and water forming corn cakes that after drying are used in the canons that will burn completely before exploding.