From patchwork Tue Jul 20 08:55:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12387867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC1EFC07E9B for ; Tue, 20 Jul 2021 09:02:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA66D6120E for ; Tue, 20 Jul 2021 09:02:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA66D6120E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SA6ze+Je8qGyFGzHeoaDZ1EsHZuygZfFT/RwAcLXSNg=; b=YhJ6r8MUY8p5i+ vDdBODtrN25o+6Sv7r7EIIo+Vxyw9i5sYtLc34KV+A4qDRKtZOrZ4i29BNMbwH4dLTNdbAWTVw23f fc2I9Ger+4qluWGCEKR7Al4bInRL0IHo4Ph8f0Vzgb8mCMiwUJUKjEHXGgZERKedtxm7ANtLBfuUH +tOqZ7lHbAmeMoLbc6wrJeJV/Mx1XSTvmDNlJwgfds9RlA3vXux5sbNMPw1FzdaIZ1jf9xhOuwWHd Kw4ZBZ1MiE1+/eK29MdK/7NgJLj4Sr0IgCP35GwqcQqdech1HBG0E+CZrC/RqJSoCtCf5SgIoooGq /rYbRrOeIsi8h7S78iDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5lbS-00CKdK-4k; Tue, 20 Jul 2021 08:59:50 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5lXn-00CIvs-QW for linux-arm-kernel@lists.infradead.org; Tue, 20 Jul 2021 08:56:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1626771363; x=1658307363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xHDP9R1cWsgZiXIzdqzaDMHHbipFi9sp5dcaOBn5n0o=; b=11ejAgNJezyRv1EhFFCw0Al3NRt38i604JW2fratfyNL3hcQFCmlP4XZ hidU9ggpdrpdPDGRGXehi5We1IOz6I9ZGwAlFHQbBf69ZmUPp8KIME0iH WZs0BFP7jptnLHpDKzpdapQ7ePi4qkhDRcwce9LWQ79zxx94yzSvWd3DK O/8f1+uXuOzv0p4DRpHSOMUTvrS22n7DYjihTkbZSO+luZaKa44ho1Th5 nhx/ngAaxXjz/IkHD3/B+IB3RnudtLWwsu+R0H10Cs+/5a/iZ5RLXS98J 2eUgdfO6MIyAMnQjoGjFALMGXezdCvu17Mfoo9VEQje9OjsESff6ohHn3 A==; IronPort-SDR: lQhwY62eWH1AlEOO9o2bVJgXPUY1yJuABOrHqL4FaIjkAYr2dTcZZ0hws1sbUwzbMWegScQPwV YqVlO5U5zu+ZefWqirqgoMvZDLq8ruliIgDCbhxQqYTDqfL9EEA0a9Qe3k7MXReU7HO7J5yAcu blh5yaEc4JBBXMy5V67JRxeuF0lZW8ACFXW3O/84jRpyIxLFqMQL4qLUuioFjG7816yruo8a/S TO0+LE8/MZ9MZEBwRFBCUOT8mM6h0rxW3jX/rrcaMD92B6c3WM4EmZABZiFfXi5+QEjdJ+cRZl 0lwasilV2puE3lX/cwN1nPfY X-IronPort-AV: E=Sophos;i="5.84,254,1620716400"; d="scan'208";a="122687363" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Jul 2021 01:56:02 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 20 Jul 2021 01:55:56 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 20 Jul 2021 01:55:54 -0700 From: Tudor Ambarus To: Subject: [PATCH 7/9] crypto: atmel-{aes, tdes}: Set OFB's blocksize to 1 Date: Tue, 20 Jul 2021 11:55:33 +0300 Message-ID: <20210720085535.141486-8-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210720085535.141486-1-tudor.ambarus@microchip.com> References: <20210720085535.141486-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210720_015603_967525_21DB5520 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, ludovic.desroches@microchip.com, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Set cra_blocksize to 1 to indicate OFB is a stream cipher. Signed-off-by: Tudor Ambarus --- drivers/crypto/atmel-aes.c | 2 +- drivers/crypto/atmel-tdes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 8ea873bf6b86..9ec007b4f8fc 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -1305,7 +1305,7 @@ static struct skcipher_alg aes_algs[] = { { .base.cra_name = "ofb(aes)", .base.cra_driver_name = "atmel-ofb-aes", - .base.cra_blocksize = AES_BLOCK_SIZE, + .base.cra_blocksize = 1, .base.cra_ctxsize = sizeof(struct atmel_aes_ctx), .init = atmel_aes_init_tfm, diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index 8380e0ab149a..e30786ec9f2d 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -991,7 +991,7 @@ static struct skcipher_alg tdes_algs[] = { { .base.cra_name = "ofb(des)", .base.cra_driver_name = "atmel-ofb-des", - .base.cra_blocksize = DES_BLOCK_SIZE, + .base.cra_blocksize = 1, .base.cra_alignmask = 0x7, .min_keysize = DES_KEY_SIZE,