feat: allow to not sign asymmetrically encrypted multi-recipient messages

An unsigned message carries no intended recipient fingerprints,
so recipients of an encrypted unsigned message
learn nothing about other recipients from the PGP packets.
This commit is contained in:
holger krekel
2026-08-29 23:11:05 +02:00
parent 5176a9c633
commit 08b2374fcf
6 changed files with 98 additions and 57 deletions
+2 -2
View File
@@ -1224,11 +1224,11 @@ pub async fn encrypt_raw_message(
let mut cleartext = format!("Autocrypt: {aheader}").into_bytes();
cleartext.extend_from_slice(b"\r\n");
cleartext.extend_from_slice(payload);
let sign_key = key::load_self_secret_key(context).await?;
let sign_key = Some(key::load_self_secret_key(context).await?);
let encrypted_payload = crate::pgp::pk_encrypt(
cleartext,
encryption_keyring,
sign_key,
sign_key.as_ref(),
compress,
SeipdVersion::V2,
)?;