Use integers as primary keys and don't expose them, and add a (unique) random ID column that's used to interface with the rest of the world.
(I understand there'll still be an index for the public key -- the argument would be that you don't bear the cost for that for most queries.)