Place shrimp paste in center of a 5" square of aluminum foil, fold to make a parcel, and press shrimp paste into a ¼"-thick disk. Heat foil parcel over medium-high heat for 1 minute until paste smokes. Using tongs, turn parcel over and toast for 1½ minutes more. Let cool for 30 seconds and unwrap parcel (shrimp paste should be black-brown around the edges and golden in the center).
Transfer shrimp paste, shallots, garlic, chiles, turmeric, and nuts to a food processor and pulse until smooth, sprinkling water in as necessary to create a creamy paste.
Heat peanut oil in a 5-quart saucepan over medium heat. Add paste mixture and fry, stirring frequently to prevent scorching, until the garlic and shallots soften and the texture is silken, about 10 minutes. Add galangal, ½ cup coconut milk, and 4 cups water. Increase heat to medium and bring to a simmer while stirring constantly. Add the green beans, carrots, sugar, and salt and stir to combine. Reduce the heat to medium-low and cook, stirring occasionally, until the vegetables are tender, about 15 minutes.
Meanwhile, pour enough peanut oil into a 2-quart saucepan that it reaches a depth of 1". Heat over medium-high heat until a deep-fry thermometer inserted in the oil reads 365°. Using tongs and working in small batches, add the tofu and fry, turning often, until golden and crisp, about 5 minutes. Transfer the tofu to a paper towel-lined plate to let drain.
Add the fried tofu and cabbage to the coconut milk and vegetable curry and simmer, stirring occasionally, until the cabbage is wilted and beginning to turn translucent, about 10 minutes. Add remaining coconut milk and cook until just heated through, about 2 minutes. Remove the galangal with tongs and discard. Season broth with salt.
Transfer vegetables and broth with a large ladle to a serving bowl and allow the curry to rest for at least 15 minutes for the flavors to come together. Serve with rice.