# Prove that I know string that hash to h [duplicate]

Lets say p = str and h = SHA512(p) i send the h which is the SHA512 of p to a friend using via email my friend in order to be sure that I'm the right person ask me to prove that I know the p. How can I can prove that I know p without disclosing it ??

As I have read so far its possible via zero-knowledge proof. Any pseudocode or python example are welcome.