|
|
|
|
|
by CiPHPerCoder
3313 days ago
|
|
First, read this: https://tonyarcieri.com/all-the-crypto-code-youve-ever-writt... Second, what is the threat model where you trust IPFS but still need to encrypt client-side? Unauthenticated CBC mode totally defeats the point of encryption, but encryption totally defeats the point of trusting IPFS. Why not just-- crazy idea!-- use authenticated encryption even if you trust IPFS? |
|
If you trust your IPFS node, you know that you're retrieving the correct content. You still don't want others to be able to read it.
EDIT: (Since HN won't let me reply to you): There is no mode of operation in which it's safe to use Hardbin without trusting the messages you're receiving, authenticated encryption or not.
Since the code and the data are both served out of IPFS at the same time, checking the message integrity is pointless. If somebody controlled the IPFS node you're using and wanted to do something malicious, they could more easily just add some code to ship the decryption key off to a remote server than perform an attack on the unauthenticated encryption.