Step 1Heat the oven to 400 degrees. Combine the rosemary and the salt in a large mixing bowl and stir in 1 cup of water until the texture is that of gritty snow.
Step 2In a large skillet, heat the oil until the surface ripples. Pat the pork tenderloin dry with paper towels and sear it in the hot oil until it is browned on all sides, about 8 minutes.
Step 3While the pork is browning, spoon a layer of salt about one-fourth-inch thick in the bottom of a gratin or baking dish just big enough to hold the pork and the potatoes in a single layer.
Step 4When the pork is browned, pat it dry with a paper towel to remove any excess oil and place it in the gratin dish, laying it down the center. Arrange the potatoes around the outside and cover everything with the remaining salt.
Step 5Roast until the pork reaches an internal temperature of 145 degrees, about 20 to 25 minutes. At this point, the pork will be quite moist but still a little pink. If you prefer the pork to be more cooked, push the temperature to 150, about 5 more minutes. Remove the baking dish from the oven and set aside 5 minutes to finish cooking.
Step 6With a sturdy metal spoon or chef's knife, chip a crack around the base of the salt crust and carefully lift off the top. Use a dry pastry brush to brush away any salt on the surface of the potatoes or the pork, turning the pork over to brush all sides. Transfer the pork to a carving board. Slice the pork into medallions one-fourth-inch thick and arrange on a serving platter. Place the potatoes in a medium bowl and toss with the shallots and butter just until coated, discarding any excess butter. Arrange the potatoes around the outside of the pork and serve immediately.