In a bowl, combine the curry powder, pepper, lemongrass, lime juice and 2 tablespoons of the oil. Season with salt. Add the chicken, turn to coat and refrigerate for 4 hours.
In a food processor, puree the shallots, onion, garlic, ginger, nuts and chiles.
In a deep skillet, heat the remaining 1/3 cup of oil. Fry the chile paste over moderately high heat, stirring, until lightly browned, about 5 minutes. Add the chicken with its marinade and cook over moderate heat until the chicken is browned and nearly cooked through, about 20 minutes. Add the coconut milk, sugar and toasted coconut and simmer over moderate heat, stirring, until the chicken is tender and the sauce is very thick, about 25 minutes. Spoon off as much oil as possible and discard the lemongrass. Season with salt and serve.