From 809cd6e495f35c88be656538f5de47bbbc6a824a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 15 Mar 2015 18:58:09 +0100 Subject: [PATCH] Prefer ZIP algorithm as discussed on OpenPGP WG mailinglist --- .../org/sufficientlysecure/keychain/pgp/PgpConstants.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java index aef9a5cdb..f739b1e6d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java @@ -53,9 +53,15 @@ public class PgpConstants { sPreferredHashAlgorithms.add(HashAlgorithmTags.SHA1); sPreferredHashAlgorithms.add(HashAlgorithmTags.RIPEMD160); + /* + * Prefer ZIP + * "ZLIB provides no benefit over ZIP and is more malleable" + * - (OpenPGP WG mailinglist: "[openpgp] Intent to deprecate: Insecure primitives") + * BZIP2: very slow + */ + sPreferredCompressionAlgorithms.add(CompressionAlgorithmTags.ZIP); sPreferredCompressionAlgorithms.add(CompressionAlgorithmTags.ZLIB); sPreferredCompressionAlgorithms.add(CompressionAlgorithmTags.BZIP2); - sPreferredCompressionAlgorithms.add(CompressionAlgorithmTags.ZIP); } public static final int CERTIFY_HASH_ALGO = HashAlgorithmTags.SHA256;