Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the IPFS content received always encrypted?

Tags:

ipfs

I have a newbie question about IPFS content. I can request a content with hash address. Is that is the content returned by the hash address always encrypted? Or the content returned can be either encrypted or plain without encryption and if encrypted, then private key is required to decode and view the content.

like image 575
user938363 Avatar asked Dec 13 '25 04:12

user938363


1 Answers

Content by default is never encrypted on IPFS unless you explicitly encrypt it before adding it to an IPFS node. So whether or not the content returned by the "hash address", also known as a CID (Content Identifier) will be encrypted entirely depends on whether or not it was encrypted before adding it to an IPFS node. There is also no way to know whether or not the content is encrypted just by looking at the CID.

In order to properly examine the content referenced by a CID, you will need to know the format of the content and how it was generated. Currently most stuff that exists on IPFS is likely to be of type UnixFS. Although it is entirely possible that content is stored as arbitrary types using IPLD. If you attempt to examine content referenced by a CID without knowing the format of the content, you will most certainly receive errors.

EDIT:

One thing I should clarify, you may very well be using an encrypted transport to receive the data, but the data itself wont be encrypted. IPFS uses a few different transports like websockets, tls, secio, plaintext, etc.. So if your talking to a node that hosts QmA which supports the tls transport, the node could send you the data over tls.

like image 179
hextet Avatar answered Dec 16 '25 23:12

hextet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!