0
$\begingroup$

How to prove that hashed data includes specific string without exposing rest of the string?

Practical example is calculating digest to be signed of the PDF file and before signing the digest we need to make sure that this PDF contains specific part in the middle. Whole PDF contents can not be show to the signing application.

When the signing application is sure that PDF indeed contains specific part then the signature is authorized.

$\endgroup$
3
  • 3
    $\begingroup$ Perhaps a Merkle tree, combined with an appropriate definition of what data is consider as leaves. en.m.wikipedia.org/wiki/Merkle_tree $\endgroup$ Oct 1 at 17:41
  • 1
    $\begingroup$ Of course you'd also have to save the data within the branches of the tree, and those could be used to brute-force the rest of the data - if that's feasible. $\endgroup$
    – Maarten Bodewes
    Oct 1 at 20:53
  • $\begingroup$ How would it work with data in the branches? There are data blocks L1, L2, L3 and we need to make sure that hash of concatenation L1+L2+L3 contains data block L2 without seeing L1 and L3 $\endgroup$ Oct 3 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.