bee
bee copied to clipboard
Bytes upload with pre-defined key
Summary
Add support for pre-defined encryption keys at /bytes endpoint uploads. Currently, encryption keys are randomly generated internally, but users should be able to specify their own keys for deterministic encryption.
Motivation
Enable efficient encrypted streaming where all stream segments are encrypted by a pre-defined key derived from the same seed.
The seed could be shared in an ACT among participants instead of creating ACT for each stream segment (or even for unrelated content since this seed should change only in case of participant list change).
Implementation
- Add optional header to
/bytesendpoint:Swarm-Encryption-KeySwarm-Encrypt: trueheader should be passed with it to keep the correctness of its definition.
- Modify encryption pipeline and hashtrie components
Drawbacks
- User responsibility for secure key generation
@nugaon Why /bytes specifically? Why not include e.g /bzz too?