Place the dried chilies in a heatproof bowl. Cover with boiling water and set aside for 20 minutes to soften. Drain and chop them coarsely. Place all the ingredients except the shrimp paste into a mortar and pestle and pound it into a paste. Add the shrimp paste and pound it some more.