The paper presents a method to enhance privacy in opportunistic networks through the use of virtual IDs. It discusses the challenges of communication in such networks, including security vulnerabilities like selective packet drop attacks, and proposes a new approach that involves user authentication and secure data transmission via virtual IDs assigned by trusted nodes. Simulation results indicate that the proposed methodology improves privacy, reduces packet loss, and increases throughput compared to existing methods.