From 9b6d08f3c5d09497604328bb8be09b4528feacc3 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 18 Jul 2022 12:03:16 +0200 Subject: [PATCH] Add MODIFICATION_DETECTION_2 feature constant --- .../java/org/pgpainless/algorithm/Feature.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/algorithm/Feature.java b/pgpainless-core/src/main/java/org/pgpainless/algorithm/Feature.java index 52de27bf..a0fc2974 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/algorithm/Feature.java +++ b/pgpainless-core/src/main/java/org/pgpainless/algorithm/Feature.java @@ -23,7 +23,8 @@ import javax.annotation.Nullable; public enum Feature { /** - * Support for Symmetrically Encrypted Integrity Protected Data Packets using Modification Detection Code Packets. + * Support for Symmetrically Encrypted Integrity Protected Data Packets (version 1) using Modification + * Detection Code Packets. * * @see * RFC-4880 §5.14: Modification Detection Code Packet @@ -35,6 +36,7 @@ public enum Feature { * If a key announces this feature, it signals support for consuming AEAD Encrypted Data Packets. * * NOTE: PGPAINLESS DOES NOT YET SUPPORT THIS FEATURE!!! + * NOTE: This value is currently RESERVED. * * @see * AEAD Encrypted Data Packet @@ -49,11 +51,20 @@ public enum Feature { * In addition, fingerprints of version 5 keys are calculated differently from version 4 keys. * * NOTE: PGPAINLESS DOES NOT YET SUPPORT THIS FEATURE!!! + * NOTE: This value is currently RESERVED. * * @see * Public-Key Packet Formats */ - VERSION_5_PUBLIC_KEY(Features.FEATURE_VERSION_5_PUBLIC_KEY) + VERSION_5_PUBLIC_KEY(Features.FEATURE_VERSION_5_PUBLIC_KEY), + + /** + * Support for Symmetrically Encrypted Integrity Protected Data packet version 2. + * + * @see + * crypto-refresh-06 §5.13.2. Version 2 Sym. Encrypted Integrity Protected Data Packet Format + */ + MODIFICATION_DETECTION_2((byte) 0x08), ; private static final Map MAP = new ConcurrentHashMap<>();