First, make the pastry. Mix the flour and a pinch of salt together in a large bowl, then rub in the butter until it resembles breadcrumbs. Add enough ice-cold water to bind the 'breadcrumbs' into a soft dough. Wrap the dough in plastic wrap and refrigerate for 20 minutes.
Preheat the oven to 190°C/170°C fan.
Lightly season the pork tenderloin, being more generous with pepper than salt, and sprinkle with the chopped rosemary. Wrap the pork in the Parma ham, overlapping the slices as you go. Place the wrapped pork on a baking sheet.
Roll out the pastry to slightly larger than the overall dimensions of the pork. Drape the pastry over the pork on the baking sheet, wrapping it under the meat – it doesn't need to be completely sealed if it doesn't quite reach. Brush the pastry all over with the beaten egg and cut slits in the top of the pastry to allow steam to escape as it cooks.