From patchwork Tue Jul 2 19:41:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 168347 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4653215ilk; Tue, 2 Jul 2019 12:42:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqycCwiBWZftdeAKS50SW6XLPOtlTY4a+Jw2nLojjf0Nt7SnyzXYFlmponq6jjx2Iq5rcjq/ X-Received: by 2002:a63:eb56:: with SMTP id b22mr30536892pgk.355.1562096535077; Tue, 02 Jul 2019 12:42:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562096535; cv=none; d=google.com; s=arc-20160816; b=Uf2YFwHraq2MG4skfh9ndlBMEfuxjSrUnY6Vz2/VhsTaycFNfjlepaUi8Z5VaplnUN hBHIXqzVsmS2SjW1Ep5ArEETUw/WTQZE1v6vjZ3R0A4Nh7Io//U7AlFbqeixGd/KIHty aB40ONCvMkGbE8KpNhz0kSfdifVRbCUn9P3PxIEMwMwtQy/tG8rCHGglZ8+BXYoBf9d6 H0PPTe6qD5TMaqxIsYvdjNa8O0+BxIiLtA+V3RWEW3nKjg6tQ3i0D/p8p+yXyUfUiYam QSxtD9CgEXPtqDL0Fd37cUQDQ8UUuwruUzDy7dKFPyQYHB/0pRRQ3NLfrpL18Yowj6hk KH1Q== 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=trJajH9cyH+LbZxrv+7nC1tNggLxsbw2lvOtUdKDNJM=; b=PX05aaMP3xkLNRxdlco87pX6a+r02peDk69w7WbdBxMUWuvaoy/WffJdRZtne6arI0 qLqwtuFbPjxtfoeSYSLuuO0tiqreem/XHLYOwyG+at1PhJ4UkHjV7cdtD6EVLEX+7GW3 iIpf4Qeyb9B0gIomYdocNBeH7pSOvSdWH/1WAv2OhIyjZyVVa/wlQQAzSE5A3XygbsCq fkc33BVoXW65k4dn5A7Rt0nV2p6v+OJY9Xik7mrrCzNtFYSzZbbGoEvxAHWthyEodzJZ mARPAuVBxRZyKYLYySJn7ooL8Q6cxRIoa7lBreIddjT3vG/FkOzwLq6685mK4EbPaaOq Wlgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vFAIUsgB; 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=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 x13si13373092pgh.116.2019.07.02.12.42.14; Tue, 02 Jul 2019 12:42:15 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=vFAIUsgB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726736AbfGBTmO (ORCPT + 3 others); Tue, 2 Jul 2019 15:42:14 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40378 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbfGBTmO (ORCPT ); Tue, 2 Jul 2019 15:42:14 -0400 Received: by mail-lj1-f193.google.com with SMTP id a21so18168051ljh.7 for ; Tue, 02 Jul 2019 12:42:12 -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=trJajH9cyH+LbZxrv+7nC1tNggLxsbw2lvOtUdKDNJM=; b=vFAIUsgB1TrvxsRf5eFLNylXY+O9MuJSETqU8ykntVQYNNIOSNEeWMYs1l8/h7HZXB 11OOd4bGMOIKMd8pc74eJ4Thosg2H9P5QA85f+VPk+uZVy4/oMDy3vApeBm9dkhBN/bD 6hP/IOyDQ/CNTF3nWLBXseR5fx81qCfSKeRimvcXtNtK3sZuTHJzJN1gmIMfla47APn2 70yPZpEiFKk37t6e9jwUXGF5HxmIWNFRy7cqXXaBuFVhc1scMJlaR/8MkfR2EiHGMlSo Eb+K5AUT2QJTjINjqWcJr+qo/AbWk0BBdXg3SYn36zOSRJf41UxMxJ0fczXCRA1wk/xn yV2A== 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=trJajH9cyH+LbZxrv+7nC1tNggLxsbw2lvOtUdKDNJM=; b=AXqFN9DSbLhq3pEOJstyfAqGgo2D1UtvqoorQByRkmpZC09p1J6ySclweAj9EBu7Hj SU2s1z07u4SN/95vWaXf1e8mpIHmYEWATkgWN3x9pGrCKnzhJctQNuXlsR+BRXxSEPP0 MCk1sQ3Jv3j0ypZpBbTgWS1U9JC+U8WzDqXuEQ8d6z3dKyjSqqw745XMMjjIA2yFtMtw fh9Ubm1GuDk91ZikvBlgBsYKY1cZkBM9oZqWFe7mgrj8gQDEeRsvTogQ6TvwoieaA1gf hUVlAgzN9U0HGKWvjKh3+i2/psboJZUev+xYLS0UApNHdu28bxFevTwPakYG2s9FuMMK rlPQ== X-Gm-Message-State: APjAAAXrM/loIY/m/2noltGjUG7mz3YD4W/1RGbJVnupV5PSJ/APrAe2 kw0Qu72DhcCIHIEBVJOpo3U0zGjzwerwAjGB X-Received: by 2002:a2e:8997:: with SMTP id c23mr18128703lji.158.1562096531542; Tue, 02 Jul 2019 12:42:11 -0700 (PDT) Received: from e111045-lin.arm.com (89-212-78-239.static.t-2.net. [89.212.78.239]) by smtp.gmail.com with ESMTPSA id 24sm4475163ljs.63.2019.07.02.12.42.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 12:42:10 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@google.com, Ard Biesheuvel Subject: [PATCH v4 01/32] crypto: arm/aes-ce - cosmetic/whitespace cleanup Date: Tue, 2 Jul 2019 21:41:19 +0200 Message-Id: <20190702194150.10405-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702194150.10405-1-ard.biesheuvel@linaro.org> References: <20190702194150.10405-1-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Rearrange the aes_algs[] array for legibility. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/aes-ce-glue.c | 116 ++++++++++---------- 1 file changed, 56 insertions(+), 60 deletions(-) -- 2.17.1 diff --git a/arch/arm/crypto/aes-ce-glue.c b/arch/arm/crypto/aes-ce-glue.c index 5affb8482379..04ba66903674 100644 --- a/arch/arm/crypto/aes-ce-glue.c +++ b/arch/arm/crypto/aes-ce-glue.c @@ -337,69 +337,65 @@ static int xts_decrypt(struct skcipher_request *req) } static struct skcipher_alg aes_algs[] = { { - .base = { - .cra_name = "__ecb(aes)", - .cra_driver_name = "__ecb-aes-ce", - .cra_priority = 300, - .cra_flags = CRYPTO_ALG_INTERNAL, - .cra_blocksize = AES_BLOCK_SIZE, - .cra_ctxsize = sizeof(struct crypto_aes_ctx), - .cra_module = THIS_MODULE, - }, - .min_keysize = AES_MIN_KEY_SIZE, - .max_keysize = AES_MAX_KEY_SIZE, - .setkey = ce_aes_setkey, - .encrypt = ecb_encrypt, - .decrypt = ecb_decrypt, + .base.cra_name = "__ecb(aes)", + .base.cra_driver_name = "__ecb-aes-ce", + .base.cra_priority = 300, + .base.cra_flags = CRYPTO_ALG_INTERNAL, + .base.cra_blocksize = AES_BLOCK_SIZE, + .base.cra_ctxsize = sizeof(struct crypto_aes_ctx), + .base.cra_module = THIS_MODULE, + + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .setkey = ce_aes_setkey, + .encrypt = ecb_encrypt, + .decrypt = ecb_decrypt, }, { - .base = { - .cra_name = "__cbc(aes)", - .cra_driver_name = "__cbc-aes-ce", - .cra_priority = 300, - .cra_flags = CRYPTO_ALG_INTERNAL, - .cra_blocksize = AES_BLOCK_SIZE, - .cra_ctxsize = sizeof(struct crypto_aes_ctx), - .cra_module = THIS_MODULE, - }, - .min_keysize = AES_MIN_KEY_SIZE, - .max_keysize = AES_MAX_KEY_SIZE, - .ivsize = AES_BLOCK_SIZE, - .setkey = ce_aes_setkey, - .encrypt = cbc_encrypt, - .decrypt = cbc_decrypt, + .base.cra_name = "__cbc(aes)", + .base.cra_driver_name = "__cbc-aes-ce", + .base.cra_priority = 300, + .base.cra_flags = CRYPTO_ALG_INTERNAL, + .base.cra_blocksize = AES_BLOCK_SIZE, + .base.cra_ctxsize = sizeof(struct crypto_aes_ctx), + .base.cra_module = THIS_MODULE, + + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, + .setkey = ce_aes_setkey, + .encrypt = cbc_encrypt, + .decrypt = cbc_decrypt, }, { - .base = { - .cra_name = "__ctr(aes)", - .cra_driver_name = "__ctr-aes-ce", - .cra_priority = 300, - .cra_flags = CRYPTO_ALG_INTERNAL, - .cra_blocksize = 1, - .cra_ctxsize = sizeof(struct crypto_aes_ctx), - .cra_module = THIS_MODULE, - }, - .min_keysize = AES_MIN_KEY_SIZE, - .max_keysize = AES_MAX_KEY_SIZE, - .ivsize = AES_BLOCK_SIZE, - .chunksize = AES_BLOCK_SIZE, - .setkey = ce_aes_setkey, - .encrypt = ctr_encrypt, - .decrypt = ctr_encrypt, + .base.cra_name = "__ctr(aes)", + .base.cra_driver_name = "__ctr-aes-ce", + .base.cra_priority = 300, + .base.cra_flags = CRYPTO_ALG_INTERNAL, + .base.cra_blocksize = 1, + .base.cra_ctxsize = sizeof(struct crypto_aes_ctx), + .base.cra_module = THIS_MODULE, + + .min_keysize = AES_MIN_KEY_SIZE, + .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, + .chunksize = AES_BLOCK_SIZE, + .setkey = ce_aes_setkey, + .encrypt = ctr_encrypt, + .decrypt = ctr_encrypt, }, { - .base = { - .cra_name = "__xts(aes)", - .cra_driver_name = "__xts-aes-ce", - .cra_priority = 300, - .cra_flags = CRYPTO_ALG_INTERNAL, - .cra_blocksize = AES_BLOCK_SIZE, - .cra_ctxsize = sizeof(struct crypto_aes_xts_ctx), - .cra_module = THIS_MODULE, - }, - .min_keysize = 2 * AES_MIN_KEY_SIZE, - .max_keysize = 2 * AES_MAX_KEY_SIZE, - .ivsize = AES_BLOCK_SIZE, - .setkey = xts_set_key, - .encrypt = xts_encrypt, - .decrypt = xts_decrypt, + .base.cra_name = "__xts(aes)", + .base.cra_driver_name = "__xts-aes-ce", + .base.cra_priority = 300, + .base.cra_flags = CRYPTO_ALG_INTERNAL, + .base.cra_blocksize = AES_BLOCK_SIZE, + .base.cra_ctxsize = sizeof(struct crypto_aes_xts_ctx), + .base.cra_module = THIS_MODULE, + + .min_keysize = 2 * AES_MIN_KEY_SIZE, + .max_keysize = 2 * AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, + .setkey = xts_set_key, + .encrypt = xts_encrypt, + .decrypt = xts_decrypt, } }; static struct simd_skcipher_alg *aes_simd_algs[ARRAY_SIZE(aes_algs)];