Whisk together sugar, cornstarch, salt, egg yolk, and pistachio paste in a small saucepan. Gradually whisk in milk until smooth. Cook over medium, stirring constantly, until mixture comes to a boil, about 5 minutes. Let boil 1 minute, still stirring constantly. Pour through a fine-mesh sieve into a small bowl; discard solids. Cover with plastic wrap, pressing it directly onto surface, and refrigerate until firm, at least 2 hours and up to 1 day.