I want du encrypt and sign a mail with MimeKit.
Generating the Message works:
CmsRecipient CmsRecipient = new CmsRecipient("mail.cer");
CmsRecipient.EncryptionAlgorithms = new EncryptionAlgorithm[] { EncryptionAlgorithm.Aes192 };
to1.Add(CmsRecipient);
var signed = MultipartSigned.Create(ctx, signer, multipart);
var encrypted = ApplicationPkcs7Mime.Encrypt(ctx, to1, signed);
message.Body = MultipartSigned.Create(ctx, signer, encrypted);
In Outlook they arrive encrypted with: 168 Bit 3DES But I need AES 265. How can I manage this?
I can set signing to RSA/SHA512 with
signer.DigestAlgorithm = DigestAlgorithm.Sha512;
but not the encryption.
Edit: Updated to my Solution