For the chicken, place the chicken legs into a shallow dish and sprinkle over the turmeric and salt. Cover and chill in the fridge overnight, to marinate.
Remove the marinated chicken from the fridge half an hour before you are ready to cook it.
Meanwhile, for the spice paste, blend all of the spice paste ingredients in a food processor until smooth.
To cook the chicken, heat a large frying pan over a high heat, add three tablespoons of the oil and, when it is smoking, add the chicken. Fry the chicken for 4-6 minutes, or until golden-brown on all sides.
Remove the chicken from the pan and set aside to drain on a plate lined with kitchen paper.
Heat a wok over a medium heat, then add the remaining vegetable oil, the onion and the spice paste and stir-fry for 2-3 minutes, or until fragrant.
Add the reserved chicken and cook for 5-7 minutes.
Add the coconut milk, lime leaves and sugar. Simmer for 25-30 minutes, or until the chicken is tender and cooked through.
Add the lime juice and stir well.
For the garnish, half-fill a deep, heavy-based saucepan with vegetable oil and heat until a breadcrumb sizzles and turns golden-brown when dropped into it. (CAUTION: Hot oil can be dangerous. Do not leave unattended.)
Fry the shallot slices until crisp, then carefully remove from the pan using a slotted spoon and set aside to drain on a plate lined with kitchen paper.
To serve, spoon the curry into four serving bowls. Sprinkle with the crispy shallots, mint leaves, red chillies and cucumber slices. Serve the steamed rice alongside.