From 5ef65d2c2b6776c523cc449806f8694956805f76 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 4 Nov 2023 23:12:48 +0000 Subject: [PATCH] crypto: Initialise AES-ECB decode context correctly This fixes Apple DH --- src/crypto-nettle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto-nettle.c b/src/crypto-nettle.c index 5f1b0ef..7ac47ed 100644 --- a/src/crypto-nettle.c +++ b/src/crypto-nettle.c @@ -318,7 +318,7 @@ static struct crypto_cipher* crypto_cipher_new_aes128_ecb( aes128_set_encrypt_key(&self->enc_ctx.aes128_ecb, enc_key); if (dec_key) - aes128_set_decrypt_key(&self->enc_ctx.aes128_ecb, dec_key); + aes128_set_decrypt_key(&self->dec_ctx.aes128_ecb, dec_key); self->encrypt = crypto_cipher_aes128_ecb_encrypt; self->decrypt = crypto_cipher_aes128_ecb_decrypt;