element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
75 stars 12 forks source link

Delete one-time keys where devices are deleted #1221

Open ara4n opened 7 years ago

lampholder commented 7 years ago

@ara4n Is this the device identity key? Or something else?

ara4n commented 7 years ago

no, the way Double Ratchet algorithms (e.g. Olm) work is that devices generate a pool of throw-away keypairs used when negotiating new encryption sessions. They preload a bunch of them onto the server, so that folks wanting to start a new session will be able to pick one at random, after which it is discarded forever, making it harder to subvert the key exchange.

This bug is an e2e bug requesting that we vape stale one-time keys from old devices, as they just clog everything up and may cause perf probs.