Explain what happens to the old keys in olm

This commit is contained in:
Mark Haines
2016-09-16 14:43:22 +01:00
parent 6ab410ef6a
commit ee7d4d0521
+3
View File
@@ -172,6 +172,9 @@ Crypto.prototype.uploadKeys = function(maxKeys) {
// Try to keep at most half that number on the server. This leaves the
// rest of the slots free to hold keys that have been cliamed from the
// server but we haven't recevied a message for.
// If we run out of slots when generating new keys then olm will
// discard the oldest private keys first. This will eventually clean
// out stale private keys that won't receive a message.
var keyLimit = Math.floor(maxOneTimeKeys / 2);
// We work out how many new keys we need to create to top up the server
// If there are too many keys on the server then we don't need to