The Chinese invented the first rocket. Their rockets were fireworks using gunpower to fly which usually only flew a few hundred meters. I was wondering if it were possible with the technology of around 1000 AD to send a firework past the Karman line. Would there be anything preventing this? If it were possible then how big would the rocket have to be?
Take, for example, the Civilian Space Exploration Team's GoFast rocket, which was the first civilian rocket to cross the Kármán line. It had a launch weight of 350kg, of which 196kg was an ammonium perchlorate-based solid propellant, which probably had a specific impulse of about 200 seconds, which compares favorably to the 80 seconds you're likely to get from black powder.
Rolling out the rocket equation, the ΔV of the GoFast is around 3km/s (compare to the A4/V2, the first rocket to cross the line, the ΔV of which Russell Borogove estimated at ~2.3km/s). To achieve a 3km/s ΔV, a black powder rocket with an Isp of 80 seconds would need a mass ratio of over 45. That's quite a challenge to achieve, to say the least... this is probably the biggest stumbling block to overcome, and I don't think it can realistically have been done with the technology of the day.
Staging might have been able to help here, but Wikipedia suggests that the first record use of staged rockets didn't happen until 1591 when Jean Beavie first described them.
Modern rockets use reasonably efficient de Laval nozzles. It isn't entirely clear when these first appeared... the answers and comments on this question imply that primitive examples may have existed since the 1200s, but I'm not sure that their precursors from 1000AD would really have been up to the job. I'm also not prepared to estimate the performance drop with simpler nozzles, though.
Even with a fancy nozzle, rockets used much before the Anglo-Mysore wars in the late 1700s apparently used fairly thin, lightweight casings which would have limited the pressure in the combustion chamber. Reducing thrust and exhaust velocity makes all the problem of black powder rocketry even worse that before, though this is perhaps the least anachronistic thing to handwave in to an imagines alt-history setting.