crypter: Define a ChaCha20/Poly1305 AEAD algorithm identifier
[strongswan.git] / src / libstrongswan / crypto / crypters / crypter.c
index 1e73baa..3e33765 100644 (file)
@@ -40,13 +40,14 @@ ENUM_NEXT(encryption_algorithm_names, ENCR_AES_GCM_ICV8, ENCR_NULL_AUTH_AES_GMAC
        "AES_GCM_12",
        "AES_GCM_16",
        "NULL_AES_GMAC");
-ENUM_NEXT(encryption_algorithm_names, ENCR_CAMELLIA_CBC, ENCR_CAMELLIA_CCM_ICV16, ENCR_NULL_AUTH_AES_GMAC,
+ENUM_NEXT(encryption_algorithm_names, ENCR_CAMELLIA_CBC, ENCR_CHACHA20_POLY1305, ENCR_NULL_AUTH_AES_GMAC,
        "CAMELLIA_CBC",
        "CAMELLIA_CTR",
        "CAMELLIA_CCM_8",
        "CAMELLIA_CCM_12",
-       "CAMELLIA_CCM_16");
-ENUM_NEXT(encryption_algorithm_names, ENCR_UNDEFINED, ENCR_RC2_CBC, ENCR_CAMELLIA_CCM_ICV16,
+       "CAMELLIA_CCM_16",
+       "CHACHA20_POLY1305");
+ENUM_NEXT(encryption_algorithm_names, ENCR_UNDEFINED, ENCR_RC2_CBC, ENCR_CHACHA20_POLY1305,
        "UNDEFINED",
        "DES_ECB",
        "SERPENT_CBC",
@@ -184,6 +185,7 @@ bool encryption_algorithm_is_aead(encryption_algorithm_t alg)
                case ENCR_CAMELLIA_CCM_ICV8:
                case ENCR_CAMELLIA_CCM_ICV12:
                case ENCR_CAMELLIA_CCM_ICV16:
+               case ENCR_CHACHA20_POLY1305:
                        return TRUE;
                default:
                        return FALSE;