The pandemic of the COVID-19  has reawakened people that viruses are still the greatest threat to human society. Quarantining the patients and tracking close contacts has been used for hundreds of years in the battle between humans and the plague, which are still useful today. In the information society, we can employ information communications technology (ICT) to suppress the spread of epidemics and lower the epidemic curve. By using spatiotemporal information, we can trace the trajectories of patients and their close contacts. However, spatiotemporal information also involves personal privacy, and it has become a topic of concern about whether people's privacy should be sacrificed for epidemic control. In this paper, we propose a close contact tracing solution based on crypto-spatiotemporal information (CSI). First, the solution encrypts spatiotemporal information to protect personal privacy. Then, it uses a blockchain platform to realize the proof of CSI and uses Intel SGX  based trusted execution environment  to perform close contact judgment. Finally, it can trace close contacts while protecting personal privacy. The evaluation results indicate that the advantages and efficiency of the proposed scheme are significant.