Open garbados opened 4 years ago
If a challenge key or encryption key becomes compromised but no peer has lost control of their machine, an admin should be able to rotate it, even if only through some formalized process of starting a new cabal. For example, an admin might execute code like this to regenerate a cabal with the same allow-list and settings, but with a new challenge and/or encryption key:
cabal.regenerate((err, newCabal) => { ... }) // default settings, regenerates challenge and encryption keys
cabal.regenerate({ challenge: false }, (err, newCabal) => { ... }) // generate new encryption key, keep challenge key
When an admin regenerates the cabal, they post a final message to the old cabal that allows peers to follow them:
{
"type": "cabal/regenerate",
"content": {
"key": "${discoveryKey}"
}
}
The new encryption key is shared during handshaking and so should not be included in this regeneration message. A compliant client could then automatically switch over to the new cabal, prompting the user for a new challenge key if it has been rotated.
This is so awesome! Great job explaining it thoroughly as well. I can see this being immensely useful.
Related to password-protected cabals, it should be possible to create a cabal that has:
Such a cabal must have at least one or more admins to be protected in this way. It is important to protect entry as obscurity is not privacy, and important to protect reads in case the multifeed falls into hostile hands.
For example, consider this hypothetical scenario:
The value of the
content
field can then be decrypted into a normal message:In this way the encryption key is never written to the log itself.
The end result is a private, encrypted cabal using public hyperswarm infrastructure.