Secure p2p client in Java, university project for distributed system course