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.
-
hash as address may be more precise. – user938363 Dec 03 '19 at 18:13
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.

- 341
- 2
- 6