security: Revert the previous change: Keep the PublicKey without a shared_ptr.