I had the idea of storing large amounts of data in a small space using a Merkle tree. But from what I understand about Merkle trees is you cannot extract the data from the Merkle root (since hashes are not reversible). Though I wonder, is there a way to use an encryption algorithm that gives a fixed output length like how we use hashes in Merkle trees? I know my question is hard to understand but looking at this diagram may give you a better idea of what I am trying to do here:
1 Answer
$\begingroup$
$\endgroup$
3
If I understand you right, you are asking if there was a way to take the $n$-bit Merkle tree root, and use it to extract the multiple files that are the leaves.
Obviously, if the information within the files is more than $n$ bits, you can't - if there are $2^n$ possible roots, then no procedure can extract more than $2^n$ different values from it, and it doesn't matter what function you use as the "hash"
-
$\begingroup$ Thank you for your answer. I am a newbie to cryptography. So can you explain what you mean by “n-bit”? $\endgroup$ Commented Aug 30, 2021 at 15:03
-
$\begingroup$ @Apollo11: the root of the Merkle tree will be some value, and we usually represent that value as a serial of bits (or bytes, where each byte consists of 8 bits - in crypto, we more often count bits rather than bytes). By $n$-bit tree root, we mean that $n$ bits are used. $\endgroup$– ponchoCommented Aug 30, 2021 at 15:08
-
$\begingroup$ Thank you for your explanation. I understand now. $\endgroup$ Commented Aug 30, 2021 at 15:14