Poor 2 cups of boiling water into a bowl with the dried chiles. Let the chiles soak while you prepare all the other ingredients.
Cut the tops off the garlic heads. Wrap the shallots and garlic in a foil package and add to a skillet over medium-high heat. Cook for 25 minutes, flipping once midway through.
Let the package sit for 10 minutes or until cool enough to handle. Squeeze the garlic out of the husks and roughly chop them. Peel the shallots and roughly chop them.
Arrange the galangal and ginger in a single layer on a piece of foil and fold it in half, making a flat package. Cook until soft, around 6 minutes, flipping once.
Heat the coriander seeds in a pan until they begin to crackle and pop (about 1 to 2 minutes). Let cool and then grind with a mortar and pestle.
Drain the chiles soaking in the bowl but reserve the soaking liquid.
Place the chiles in the bowl of a food processor and pulse until they have been chopped into fairly small pieces.
Add the lemongrass and pulse until they have reached a shredded consistency.
Add the cilantro and pulse. Add the galangal and ginger and pulse until they are finely chopped and incorporated.
Add the garlic and shallots and pulse until they are finely chopped and are fully incorporated.
Add the shrimp paste and pulse until it is incorporated. You might have to add a tablespoon of the reserved chile soaking liquid to make the mixture move.
Add the roasted and ground coriander, turmeric, curry powder, and salt and pulse until fully incorporated, pausing occasionally to scrap the sides. If needed, add the reserved chile soaking liquid a tablespoon at a time until the mixture is relatively smooth and paste-like (about 2 to 3 tablespoons).