Place the dried chiles in a heatproof bowl and top with boiling water. Set aside for 30 minutes to rehydrate.
While the chiles are rehydrating, add the caraway, coriander, and cumin seeds to a small skillet over low-medium heat to toast; shaking occasionally to prevent from burning. Remove from heat and pan when the spices are fragrant (leaving them in the pan may cause them to burn).
Using a spice grinder or mortar & pestle, grind the spices. Set aside.
Drain the chiles and place them in a food processor. Add in the toasted spices, salt, garlic cloves, olive oil, and tomato paste (if using). Puree until a smooth paste forms, stopping to scrape down the sides when necessary; about two minutes.
Transfer the harissa paste to a glass jar or container and top with a thin layer of olive oil, about a ¼ of an inch. Keep refrigerated and top off with more oil after each use. It should keep up to three or four weeks.