From 5864d222060c75e9b4d3dddc7e59b0d13b59ebdf Mon Sep 17 00:00:00 2001 From: Zhao Zhenlong Date: Thu, 29 Nov 2018 16:39:14 +0800 Subject: [PATCH] add support for xchacha20-ietf-poly1305 set nonce to 24 for ChaCha20Poly1305 in botan-2 --- lib/crypto/cipher.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/crypto/cipher.cpp b/lib/crypto/cipher.cpp index 561d677..d7b7649 100644 --- a/lib/crypto/cipher.cpp +++ b/lib/crypto/cipher.cpp @@ -129,6 +129,7 @@ const std::unordered_map Cipher::cipherInfoMap {"serpent-256-cfb", {"Serpent/CFB", 32, 16, Cipher::CipherType::STREAM}} #ifdef USE_BOTAN2 ,{"chacha20-ietf-poly1305", {"ChaCha20Poly1305", 32, 12, Cipher::CipherType::AEAD, 32, 16}}, + {"xchacha20-ietf-poly1305", {"ChaCha20Poly1305", 32, 24, Cipher::CipherType::AEAD, 32, 16}}, {"aes-128-gcm", {"AES-128/GCM", 16, 12, Cipher::CipherType::AEAD, 16, 16}}, {"aes-192-gcm", {"AES-192/GCM", 24, 12, Cipher::CipherType::AEAD, 24, 16}}, {"aes-256-gcm", {"AES-256/GCM", 32, 12, Cipher::CipherType::AEAD, 32, 16}}