What primitives are needed to generically implement public-key cryptography? Public-key cryptographic systems are often implemented on top of an existing problem. For example, RSA is built on top of integers and the difficulty of factoring. ECDSA/ECIES are built on top of elliptic curves and the difficulty of the discrete logarithm.

My question is, what are, mathematically speaking, the exact primitives needed to implement public-key based signature and encryption cryptography in a generic way?
Unfortunately there is no real answer to this. We know that one-way trapdoor permutations suffice, but this is really just an abstraction of factoring. ECDSA/ECIES/ElGamal don't work via any trapdoor permutation, and neither do lattice-based public-key encryption schemes.

In the private-key world, we know that one-way functions are necessary and sufficient. However, we have no analogous primitive that is both necessary and sufficient for public-key encryption, beyond itself. (That is, of course, public key encryption is both sufficient and necessary for public-key encryption, but this is a very annoying answer that means nothing.)

Note, that one-way functions are sufficient for building digital signatures, and so the question of what is necessary is really only for public-key encryption.