hypercore-protocol / hypercore-next

Hypercore 10 is an append only log with multi-writer primitives built in.
MIT License
150 stars 15 forks source link

Allow overriding encryption key in `core.session()` #98

Closed kasperisager closed 2 years ago

Nuhvi commented 2 years ago

This will work fine for me just as #97.

But I am curious as to when you imagine having multiple sessions with different encryptionKeys useful? Even if the goal is to support rotating encryption keys, wouldn't it be better to expand the headers to include all the encryption keys at different ranges?

If the integrity of Hypercores depends on the ability to decrypt it, why leave housekeeping to higher-level abstraction?

kasperisager commented 2 years ago

Unless I'm mistaken, #97 completely defeats at-rest encryption.