From 83481d9c24bdcfcefbae1e4e9b4e8c7423bbba6d 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 054e96e2..3a51f505 100644 --- a/profile/preset.go +++ b/profile/preset.go @@ -82,6 +82,7 @@ func ProtonV1() *Custom { SetKeyAlgorithm: setKeyAlgorithm, Hash: crypto.SHA512, CipherEncryption: packet.CipherAES256, + CipherKeyEncryption: packet.CipherAES256, CompressionAlgorithm: packet.CompressionZLIB, KeyGenAeadEncryption: &packet.AEADConfig{ DefaultMode: packet.AEADModeGCM, @@ -89,6 +90,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,