(This poorly named task has nothing to do with prime numbers or even, really, prime digits. Sorry 'bout that.)
A cryptarithm is usually presented as a pencil-and-paper task in which the solver is required to substitute a digit for each of the asterisks (or, often, letters) in the manual evaluation of an arithmetic term or expression so that the consistent application of the digits results in a proper expression. A classic example is this cryptarithm, shown with its unique solution:
SEND 9567 S->9 E->5 N->6 D->7 + MORE + 1085 M->1 O->0 R->8 ------- ------- MONEY 10652 Y->2
The following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. Since the asterisks are generic, any digit from the input set can be used for any of the asterisks; any digit