4 ms·
I implemented a slightly different method for my prototype multimedia chat application (text/images/audio/video) over IPFS. I used an envelope format for permis
by vivegi 5y ago
I implemented a slightly different method for my prototype multimedia chat application (text/images/audio/video) over IPFS. I used an envelope format for permissioned encrypted content:
{
perms: 'ipns name of permission list'
payload: [encrypted payload]
}
This ensured that the content hash of the envelope remains the same even when peers are added/removed from the perms list. The permission list had entries of the form:
{
salt: [a random salt],
peer_pubkey_hash: [salted hash of the public key of the permitted peer],
wrapped_enc_key: [payload private key that is encrypted using the peer's private key]
}
The content hash shared is that of the encrypted envelope and a permitted peer will get the perm list, lookup its entry using the peer_pubkey_hash and unwrap the wrapped_enc_key to obtain the encryption key that is used to decrypt the payload.
I am oversimplifying, but that was the general idea.