Sift the unsweetened cocoa and flour into a large bowl. Add the butter and rub it in with your fingertips ntil the mixture resembles fine breadcrumbs. Stir in the caster sugar. Add the egg yolks, vanilla extract, and enough cold water to mix to the consistency of a dough.
Cover the dough in plastic wrap and leave to chill in the refrigerator for about 30 minutes. Roll out the dough on a lightly floured work counter. It will line an 8-inch tart pan or cake pan.