Blend all spice paste ingredients together until smooth, adding a little water if needed.
Heat oil in a large heavy-bottomed pot over medium heat. Add the spice paste along with star anise, cinnamon stick, and cardamom pods. Fry until aromatic and oil begins to separate, about 8-10 minutes.
Add chicken pieces, bruised lemongrass stalk, and turmeric or kaffir lime leaves. Cook for 5 minutes, stirring to coat chicken with spice paste.
Pour in coconut milk, water, salt, and tamarind mixture. Bring to a boil, then reduce heat to low and simmer uncovered.
Continue simmering for 1.5-2 hours, stirring occasionally, until chicken is tender and sauce has thickened considerably.
In the last 15 minutes, stir in the desiccated coconut mixed with coconut milk to further thicken the sauce.
Cook until the sauce is dark and coats the chicken pieces. Adjust seasoning with salt if needed.