Combine lentils and garlic in a large saucepan and cover with water. Bring to a boil, reduce heat to low and simmer, covered, until very tender, 30 to 35 minutes.Advertisement
Drain the lentils and garlic and transfer to a food processor. Add olive paste (or olives), capers, anchovies (or anchovy paste), lemon juice and oil; puree until smooth. Season with salt and pepper. Scrape into a bowl and stir in rosemary.