As far as the LEGALITIES of it, that would depend on your local laws. Some areas might prohibit it, or require a license.
There are also usually laws about storing the stuff. That's where the widow of the man killed had real problems.
Seems there are local ordinances, and I think, state laws about explosive storage magazines. He had WAAAYYYYYY over the limit stored, no permit, and the fool was making more close to the magazine.
As far as I know, there aren't any Federal laws about "rolling your own".
A number of sources have recipes for the mixture of black powder.
It's not that complicated, just dangerous.
Years ago, when DuPont was still making it, their factory was a series of small stone buildings, with very thin sloped tar paper roofs. This was all located beside a small creek.
Whenever an accident occurred, they called it being "blown across the creek", because that's what actually happened.
They'd clean out the building, pick up what was left across the creek, put on a new tar paper roof, and production was re-started.
Black powder was of fairly low quality until they learned how to do a process called "Corning". This process made for a much better blend, higher quality, cleaner burning , and more uniform size.