I have a text document for which I don't want to reveal the whole contents, but I want to release some information about it in advance to claim the originality later. For example, if the text document is X, then I can use any good hash function h and release h(X) to the public. Later if I want to claim that I already had the document X beforehand I can just release the whole X to the public.

But revealing the whole X to prove that I have X exposes the whole content of X as well. With that I wonder if there is a utility that produces the 'hash' h(X) and some zero-knowledge proof scheme so that I can claim to have the X that matches with the has value h(X) without revealing the actual contents of X.

So basically I think I want something analogous to some command-line utility (say, PGP) for zero-knowledge proof. Will there be a good utility for doing so?

1 Answer 1


I believe the standard way of doing this is to provide the SHA checksum of the file. This is the kind of hash you seem to be contemplating, but had nothing to do with PGP.

They are a NIST standard, so reputable. Don't use SHA1 as it can theoretically be hacked- SHA2 is OK.

sha256sum can create this hash from a file in Linux and Windows has a PowerShell command get-filehash to do the same.

For added evidence, you can additionally provide alternative hashes (like sha3 and md5 - but note md5 by itself is not strong enough). Also consider lawyers that are a member of the bar have obligations so you can ask them to retain a copy - and in some countries JP's can help with attestation as well.

  • Thank you for your comment. I am aware that I can use the good hash functions you suggested. It's that I also want to convince others upon request that I do have the original document with the public hash value, while not revealing the original document itself. With a SHA checksum I would have to reveal the whole document in order to prove that I do have a document of the same hash value. Commented Feb 22, 2022 at 2:19
  • I am not sure I follow what you are trying to do, or if I do understand it, I'd expect its not possible, That said, I do not have intimate familiarity with the "Zero Knowledge Proof" concept you are claiming. This might be a better fit for cryptography stack exchange?
    – davidgo
    Commented Feb 22, 2022 at 4:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .