agora-org/agora

Display file hash in listing

Opened this issue · 1 comments

You could display the file hash next to the file name in the listing.

Then a downloader/buyer will know that they are downloading the exact file that they want.

The seller could still cheat and show a fake file hash in the listing, but it would still be a little useful, I think.

An alternative way to sell files trustlessly:

  1. Allow anyone to download the encrypted file without payment, and provide the hash of the encrypted file + the adaptor signature of the encryption key.
  2. The lightning payment can then be used to obtain the preimage scalar of the adaptor signature.
  3. After the payment, the buyer can use the preimage scalar to decrypt the file.

This will only work if lightning channels are using PTLCs instead of HTLCs. Not possible with HTLCs because it's impossible to generate multiple invoices with the same preimage.