aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java
diff options
context:
space:
mode:
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConstants.java10
1 files changed, 9 insertions, 1 deletions
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 90991ba15..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,11 +53,19 @@ 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;
+
/*
* Note: s2kcount is a number between 0 and 0xff that controls the
* number of times to iterate the password hash before use. More