From 7497f1f17b941c09f84e6e4c6a5979e9c9b79851 Mon Sep 17 00:00:00 2001 From: Tim Henkes Date: Sun, 18 Nov 2018 16:52:57 +0100 Subject: [PATCH] Allow 12 for the size of the IV --- plugins/signal-protocol/src/signal_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/signal-protocol/src/signal_helper.c b/plugins/signal-protocol/src/signal_helper.c index 7de934e9..91fcefbd 100644 --- a/plugins/signal-protocol/src/signal_helper.c +++ b/plugins/signal-protocol/src/signal_helper.c @@ -222,7 +222,7 @@ int signal_vala_encrypt(signal_buffer **output, int algo, mode; if (aes_cipher(cipher, key_len, &algo, &mode)) return SG_ERR_UNKNOWN; - if (iv_len != 16) return SG_ERR_UNKNOWN; + if (iv_len != 16 && iv_len != 12) return SG_ERR_UNKNOWN; gcry_cipher_hd_t ctx = {0}; @@ -283,7 +283,7 @@ int signal_vala_decrypt(signal_buffer **output, if (aes_cipher(cipher, key_len, &algo, &mode)) return SG_ERR_UNKNOWN; if (ciphertext_len == 0) return SG_ERR_UNKNOWN; - if (iv_len != 16) return SG_ERR_UNKNOWN; + if (iv_len != 16 && iv_len != 12) return SG_ERR_UNKNOWN; gcry_cipher_hd_t ctx = {0};