From patchwork Mon Aug 19 14:22:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 171639 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3054532ily; Mon, 19 Aug 2019 07:24:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6uvOa8lAhmWongZdyyIA0L294RAKeQ+QZXoZltmoJIyQJiliWZEH0nMpHnvPp9ji0mtqS X-Received: by 2002:a62:e910:: with SMTP id j16mr24922927pfh.123.1566224652222; Mon, 19 Aug 2019 07:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566224652; cv=none; d=google.com; s=arc-20160816; b=GMrdmS7Y5Xb9yEZvaOhAKnGrxAKicPpR1QLnxAKQaudaWu4LoGN60REgAIER1wZc2y S1ji+83pt8EkkdQt642gn63R7fNNyLWtFxySrhAlSzHuHGzMhEFN4qqzVnEsi7N0iweJ CwvfaGIqEuTzNgOWN9V5Ajm/vkMjyTEkmOFQH74JVGXKJ7vQn66MQ6OB3AA9l1eZrNWm 9D9/7AUFUzAUuU7/xk5X+HEsg7VZjXIc03qzKwuKtxcBmGaYqjlrgxurSSDmq5igSKho 8xuND3mefGf8hefBJrlxhclDa39kVLRA6lrUWMilkiOe9KNKcFZWgSpi9M3HC2QGPbnK EkWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Ze9YdeG54uGI/7oCptuYPG1qBhEdnJDuSAQDXLeVnX8=; b=CTTE6wD68C+Y36unUycfGXs8uz4cxweEBzSRDTSaUpDfkSn2K2yo3PyV/n1QkeLDX+ /o5e6DE7ex2jai6GjD1RBG8scHKXWYPyGYXNudl4JZZMLYgEw3eVvMBaMSVICGlxcEUC Bf4dC0nTARO2MtQ5Iz1TnoDcwoGvehrT7T6FfWVU1bD6c+9B8U/eHHHc46U9v2FOlCsy 4W8vz5+aO7a/4cxh85MmOoxyyQb90TGXmfE5pfIaylge5fwOcvVOtUlePvUDFqPHoFR8 Z4UP7D4/oxo0FNP70UJdkHrtb/kiUej/8bjC3Cgc2qKZDNlRKX4ykujwT4h3wQuab9fq sofg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dDjKzbkH; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w188si10657748pfb.175.2019.08.19.07.24.12; Mon, 19 Aug 2019 07:24:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dDjKzbkH; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbfHSOYL (ORCPT + 3 others); Mon, 19 Aug 2019 10:24:11 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54031 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbfHSOYL (ORCPT ); Mon, 19 Aug 2019 10:24:11 -0400 Received: by mail-wm1-f65.google.com with SMTP id 10so1803897wmp.3 for ; Mon, 19 Aug 2019 07:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ze9YdeG54uGI/7oCptuYPG1qBhEdnJDuSAQDXLeVnX8=; b=dDjKzbkH+8BuYJwEP1RMQY7sy1oABKnDPP6BZiuKeRpsp1tRLXNnZuDXQfS2QxV9wu 2Ndjj6gIYsj46tlKHLfCAl0hUJXoTnQymqYntNbhx2KyNdty+5H398adZV9NFh+bHEZw M/GNc2IAga8TN5JRedboXn68L9aHaGiPe33lnS3CB0DwT48xGzxuRU/WZxdwYqeLTlEr 0/8AQKldpcdz0u2su35MkNWYOkYYzsTUX230d01gOf6w3kmfEoXDOjrMHswvZHT10D9A vfakDyKoQ4heQd5Q61UiKtBlf+PIrUqTPdy2ZFOdxbpznrVayWnD7iZd5gA3qTZLl2xh CqwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ze9YdeG54uGI/7oCptuYPG1qBhEdnJDuSAQDXLeVnX8=; b=GHOiD0X7WjU3zDVmZdUV1fatFczZ+nl9A8t0PC9fx2ttpXH4xiWXJi+yK0kOyQJbiO 9jacZeQmNThLmQzbALkQGBFBdrUhMXGBFsbCj2QfpgwMDlMlSxzgoed3ywcIiPlvWR4/ cAeibINrEA70XnrmYCES8ZdD+n4Tw2D3eirUm3fSy1+Ft0TNHTRvIsKqaV/EnXj1BIP+ BcFst+6aGcIyQwsqz8K2YclLG20BKCmOUlvtBjZevqWw2CzU3uIImbFDDL8zjkgMJ3gx MOAbIRs5lnkxMleC5SUFDL4nxy/pGoBDN46nP/3/S5FqG31ZMX/1A19KnBOdUrbs8+2T ZyxQ== X-Gm-Message-State: APjAAAWAgc1F5GtJHhCMpthSJadqBxPzS892iipnTXCOCGEP8BA6r+Re kavvj1DTmlpVMbG8KNs2fUjwog== X-Received: by 2002:a1c:1d42:: with SMTP id d63mr19913988wmd.34.1566224649604; Mon, 19 Aug 2019 07:24:09 -0700 (PDT) Received: from localhost.localdomain (11.172.185.81.rev.sfr.net. [81.185.172.11]) by smtp.gmail.com with ESMTPSA id o17sm13643356wrx.60.2019.08.19.07.24.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Aug 2019 07:24:09 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, Ard Biesheuvel , Krzysztof Kozlowski , Vladimir Zapolskiy , Kamil Konieczny , linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/2] crypto: s5p - use correct block size of 1 for ctr(aes) Date: Mon, 19 Aug 2019 17:22:26 +0300 Message-Id: <20190819142226.1703-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819142226.1703-1-ard.biesheuvel@linaro.org> References: <20190819142226.1703-1-ard.biesheuvel@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Align the s5p ctr(aes) implementation with other implementations of the same mode, by setting the block size to 1. Signed-off-by: Ard Biesheuvel --- drivers/crypto/s5p-sss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Acked-by: Kamil Konieczny Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index ef90c58edb1f..010f1bb20dad 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -2173,7 +2173,7 @@ static struct crypto_alg algs[] = { .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY, - .cra_blocksize = AES_BLOCK_SIZE, + .cra_blocksize = 1, .cra_ctxsize = sizeof(struct s5p_aes_ctx), .cra_alignmask = 0x0f, .cra_type = &crypto_ablkcipher_type,