From patchwork Tue Nov 29 17:23:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 84888 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2408582obn; Tue, 29 Nov 2016 09:24:21 -0800 (PST) X-Received: by 10.84.217.149 with SMTP id p21mr36186771pli.121.1480440261191; Tue, 29 Nov 2016 09:24:21 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si32186079plm.37.2016.11.29.09.24.21; Tue, 29 Nov 2016 09:24:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758152AbcK2RYO (ORCPT + 1 other); Tue, 29 Nov 2016 12:24:14 -0500 Received: from mail-wj0-f173.google.com ([209.85.210.173]:35157 "EHLO mail-wj0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758074AbcK2RXn (ORCPT ); Tue, 29 Nov 2016 12:23:43 -0500 Received: by mail-wj0-f173.google.com with SMTP id v7so151501727wjy.2 for ; Tue, 29 Nov 2016 09:23:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=XdWfIf7I91Hyy85j8nrVvQHl4JgUa8XgGKk4FCmmiAs=; b=MxwEVU7xzwDOaSzor7+wRsR63fPesv9NzoqS75tMBrzEykGe0fkOc0enonivGGo9+F 6+XrfSfmq7mYo+wyOPoXek72aaW/27qL4g2iGeqQyOf0P5d1lJeiCOBiC4Op3+gfiEsn ZgAAP5oH2jzYiH5cA1NqdCVgfP0yDZllxAmcU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=XdWfIf7I91Hyy85j8nrVvQHl4JgUa8XgGKk4FCmmiAs=; b=MScDLTYWECyfognvQQRXS7MnKEuht7vDPmq2ILHO18MY2NREJrK/Xph1eiOHpYUQk9 1767FM/awkUhhZWUHFDx3UtIiUuz0j4bRoN5O2TBviZSYaDk5Frq20aMB9Psbtnz4JBO W977ICWK8COnwEC/8TN+ta2rdyw9WM1YIIfVEjeu8PIsMIcCAAnEwMEPVM7/PO8TLT0N fnTETZ0kReKfebBe68ajF93BkTL4OTYH0Rgtj3k2yannVLIAKYhW3nM6NyC5bw8K3ax3 ghWtEbNj2zey4anpK0q65qC9BQ6dPV+DWdJm4z0NEqDkQMES7HT8W9t0lNPFX7bI1WB5 LRUQ== X-Gm-Message-State: AKaTC03N5n501jWvUavPStJK+EBvMlrkVSIebpsgr2SQzgPiEbV/NJAwlnYA59eWDjTbe5n8 X-Received: by 10.194.8.226 with SMTP id u2mr24524299wja.91.1480440220788; Tue, 29 Nov 2016 09:23:40 -0800 (PST) Received: from localhost.localdomain ([105.138.199.36]) by smtp.gmail.com with ESMTPSA id p144sm3816923wme.23.2016.11.29.09.23.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Nov 2016 09:23:40 -0800 (PST) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Subject: [PATCH] crypto: arm/aesbs - fix brokenness after skcipher conversion Date: Tue, 29 Nov 2016 17:23:36 +0000 Message-Id: <1480440216-341-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The CBC encryption routine should use the encryption round keys, not the decryption round keys. Signed-off-by: Ard Biesheuvel --- Another fix for the queued changes, this time for 32-bit ARM. I must say, I'm not impressed with the level of testing that has been carried out after applying these changes. If you had cc'd me on these patches, I would have been happy to test/review. arch/arm/crypto/aesbs-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/crypto/aesbs-glue.c b/arch/arm/crypto/aesbs-glue.c index f5eafce10557..d8e06de72ef3 100644 --- a/arch/arm/crypto/aesbs-glue.c +++ b/arch/arm/crypto/aesbs-glue.c @@ -113,7 +113,7 @@ static inline void aesbs_encrypt_one(struct crypto_skcipher *tfm, { struct aesbs_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); - AES_encrypt(src, dst, &ctx->dec.rk); + AES_encrypt(src, dst, &ctx->enc); } static int aesbs_cbc_encrypt(struct skcipher_request *req)