feat: Increase secret size to 256 bits of entropy

This is for quantumn computers. When trying to break AES, quantumn
computers give a square-root speedup, i.e. the 144 bits of entropy would
take as many queries as breaking 72 bits of entropy on a normal computer. This neglects
e.g. the costs of quantumn circuits and quantumn error correction [1], so,
144 bits entropy would actually have been fine, but in order to be on
the very safe side and so that noone can complain, let's increase it to
256 bits.

[1]: https://csrc.nist.gov/csrc/media/Events/2024/fifth-pqc-standardization-conference/documents/papers/on-practical-cost-of-grover.pdf
This commit is contained in:
Hocuri
2025-08-04 17:17:49 +02:00
parent 13bbcbeb0e
commit 494ad63a73
4 changed files with 32 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ use crate::securejoin::{self, handle_securejoin_handshake, observe_securejoin_on
use crate::simplify;
use crate::stock_str;
use crate::sync::Sync::*;
use crate::tools::{self, buf_compress, create_id, remove_subject_prefix};
use crate::tools::{self, buf_compress, create_broadcast_shared_secret, remove_subject_prefix};
use crate::{chatlist_events, ensure_and_debug_assert, ensure_and_debug_assert_eq, location};
use crate::{contact, imap};
@@ -1566,7 +1566,7 @@ async fn do_chat_assignment(
} else {
let name =
compute_mailinglist_name(mailinglist_header, &listid, mime_parser);
let secret = create_id();
let secret = create_broadcast_shared_secret();
chat::create_broadcast_ex(context, Nosync, listid, name, secret).await?
},
);