Using IPFS DHT for custom key/value

Hello together,

I would like to know if I can use the DHT of IPFS as a kind of registry to find information related to a CID.

Example: I have merkle trees that consist of roughly 2000-5000 file hashes. Those merkle trees (XML Format) should be put on IPFS where i get a CID back. Now I want to be able to find the CID which contains the corresponding merkle tree only by the file hash. So I would get the CID of the merkle tree, if I look for my file hash on IPFS. The entry for the DHT would look something like this: {key,value}:{file hash, CID}.

I know that I could build my own hash table where I map the file hashes to a CID. My first thoughts were to store this hash table also in IPFS and let a DNS point to it, so its the single source of truth and could easily be found. But as I want to keep everything as decentralized as possible, my thoughts where that I could maybe use the DHT of IPFS to do something similar.

Is there a way of doing this or something closely related to this?