Tracking and controlling the spread of a virus in a privacy-preserving way