From 4aeb309800e31534f1c92b6c39ae273e4fafc388 Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter Date: Tue, 25 Jun 2024 17:03:24 +0200 Subject: [PATCH] feat: Update key encryption in proton profile - Set key encryption cipher to aes-256 - Set s2k count to 65536 --- profile/preset.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profile/preset.go b/profile/preset.go index 506f36df..ee5ab3bf 100644 --- a/profile/preset.go +++ b/profile/preset.go @@ -79,6 +79,7 @@ func ProtonV1() *Custom { SetKeyAlgorithm: setKeyAlgorithm, Hash: crypto.SHA512, CipherEncryption: packet.CipherAES256, + CipherKeyEncryption: packet.CipherAES256, CompressionAlgorithm: packet.CompressionZLIB, KeyGenAeadEncryption: &packet.AEADConfig{ DefaultMode: packet.AEADModeGCM, @@ -86,6 +87,11 @@ func ProtonV1() *Custom { CompressionConfiguration: &packet.CompressionConfig{ Level: 6, }, + S2kKeyEncryption: &s2k.Config{ + S2KMode: s2k.IteratedSaltedS2K, + Hash: crypto.SHA256, + S2KCount: 65536, + }, DisableIntendedRecipients: true, AllowAllPublicKeyAlgorithms: true, AllowWeakRSA: true,