Place dried chile peppers in a small bowl and cover with warm water; soak until rehydrated, about 20 minutes. Drain.
Heat a skillet over medium heat. Cook and stir cumin seeds, coriander seeds, peppercorns, and whole cloves in hot skillet until fragrant, 3 to 5 minutes. Transfer spices to a small bowl to cool completely. Grind spices into a fine powder using a spice grinder or mortar and pestle.
Return skillet to medium heat. Cook and stir cinnamon, mace, nutmeg, cardamom in hot skillet until fragrant, 2 to 3 minutes. Transfer spices to a separate small bowl to cool.
Process garlic, onion, lemon grass, rehydrated chile peppers, ginger, shrimp paste, and salt in a food processor until smooth. Add all spices and process until smooth and well-mixed.