(I feel bad about giving this answer, given how horrifying this weapon continues to be in the modern world, and how unconscionable it is to have it widespread any earlier in history, but...)
You are starting out with handheld weapons, but if it were me, looking to alter the course of warfare most simply and effectively in the middle ages, I would go with land mines.
Granted, this is a situational weapon, but all the materials you would need are widely available, and the weaknesses in medieval metallurgy aren't a problem.
The simplest version of a landmine is just a metal packet filled with gunpowder and a glass vial filled with acid. When a soldier or a horse steps on the vial, it cracks, and the acid drips into the gunpowder generating enough heat to set it off.
Your primary concern is going to be safety. No torches where you make your gunpowder. Do it outdoors, but keep it dry. Store it away from people. Combine the elements only when you are ready to use them. The vials of acid are relatively harmless, and the skills of creating them already exist. Don't put them in the mine until its already buried, though.
Your soldier should be aware of the tactics to best make use of these weapons, and the way medieval warfare was fought, the results would be devastating.