From patchwork Thu Jun 27 10:26:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 167898 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2148358ilk; Thu, 27 Jun 2019 03:27:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzONAWdk58rgI12Jz7poDv1iNccTIk4w0g/HYTwdoBCPea5AoejuChZppfJ14qzYmGy8ew6 X-Received: by 2002:a63:2a83:: with SMTP id q125mr3075756pgq.102.1561631274355; Thu, 27 Jun 2019 03:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561631274; cv=none; d=google.com; s=arc-20160816; b=W4DkTiViauN7bS/HHYJ9c1j/DfSlIJJKAZskCbW1Z9BtIZanku8Oh5vSQM0t60HD99 rRziVVHx1x9Tzp31bJ6Il/YBks//i1MGKwA1uAW2Yt+cNFDeY/dmT36WK7TMGeEvRXlH ekrdUqyPojhSWRkpVXnvToGXq31nAYxk4R3Olt74TSKBvTUcIZkoHsKCTc0a8F1o8A55 9e421CvxXkqFScQ9cVbs8eGE7thCEo0ZndwQDnxtPUmDlUQ2Kig/ow1mv0hsKTJVkGHT lguk4ggvacycsUSt/h3wDnBOF/zNIwCc6O0onbzK5s5E4He/6JADNAsb4G44kcLeyBKm l3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BVjKB83CGDhuLXJgz703gQuRW2ORbNsUnSLW3NNqkVc=; b=myMv70e+k3hmXnJlZ8/ExcRBHekw82SeczWaVt/1xE/495dEBQQPEEwzqLwoyLO+fa iVfExKNIdtMc1RSS+F0NGnxi3YWMZGOtLCSvvDEJ4aIjZARFea6K4iJa/bmrqDMIN/Hh IzEREd6bbrR8eugVG1wa+X1aK1xSi/3Tf/hG/Gh/pf6tmuAy032LpQ4xtZR+8XuBnPvv pPQZCl5iEefPyT3UZtkeLP/afHo6LpEuuqmOKzF+oqExRG2m2Dxfcyhx4DM/R5V41TBQ AsxAi4mM0AdBHNyBoj99i8r3rq4I+w6jLt0Aaz7EVfFYLZHSjonjWHvaQkpK4LkYO0HT 6KrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pFRNGVBV; 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 f32si4829522pjg.42.2019.06.27.03.27.54; Thu, 27 Jun 2019 03:27:54 -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=pFRNGVBV; 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 S1726370AbfF0K1x (ORCPT + 3 others); Thu, 27 Jun 2019 06:27:53 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38051 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbfF0K1x (ORCPT ); Thu, 27 Jun 2019 06:27:53 -0400 Received: by mail-wm1-f66.google.com with SMTP id s15so5103705wmj.3 for ; Thu, 27 Jun 2019 03:27:51 -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 :mime-version:content-transfer-encoding; bh=BVjKB83CGDhuLXJgz703gQuRW2ORbNsUnSLW3NNqkVc=; b=pFRNGVBV903LkrX6Ej7fElal8/dsVoWDCuZybsQAlqT1+nIllH9Vc7gEtNmwwCpctg scw9hyKtMmF21FYPvrznEo/dLZrf3kCTfjrK9QYizKP6jJ/Y7SWmWUcEncfWsyg+nlA7 pzhRZacgY6+FMLHITkkEnhjOdpPdPcMlWQkhqgGIau2npN12wjlHLKtDSAonx1ytKPSk TZB/RBwHVML2sx5ulymyVcgK/UbXVZ4GJ7FbSnaG1B6PcV7CS2/EyvlKvMJgGnN9znlA fv5KnztOyXVaZPid25gPwoqNuI1u7/L4Fh5Id4BVtSZ7Y8tgv6jCUDr3y2+ZBNi+XOWS G4MA== 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:mime-version:content-transfer-encoding; bh=BVjKB83CGDhuLXJgz703gQuRW2ORbNsUnSLW3NNqkVc=; b=Mca/JI58KrRY9qDw/wDSvn8BsTsL9LKuuQbwo72TK8efIpwea4XL8uahNQ0nu8F+cF ipng6LY5chF4l6LXyr7GjhvLjW5HobiL/HYxPyAw3xPzAqVTPzXMpGA7C6Zhoie95nDG 8GVyA9oj+B/zRu+tBs/VSLA46VJQk05yuV0PjSqUhnJyXKC54cnG5sXYcXomkFDsA8xP 2JSF4f15JB835vbLIRxwIzH2bUFBHiEOakZEQyqMaE97k5I6VXUtJtIWY5trvRzwfwKM V3aTW0J50CF0dsFxNpomRMMw2s+HNmcX6CUiqHAimpbSDK2IIewE50JTBK2fcty8rsq1 +Izg== X-Gm-Message-State: APjAAAW1WZfFmkqN2pMQqY5CPjcX2Vt49QU7z0WGsV894Y2fQbNJVTxg V1ZxgGwVWSfJqgDizA5I7GO2jki9aFY= X-Received: by 2002:a7b:cc16:: with SMTP id f22mr2553680wmh.115.1561631270702; Thu, 27 Jun 2019 03:27:50 -0700 (PDT) Received: from localhost.localdomain (aaubervilliers-681-1-8-173.w90-88.abo.wanadoo.fr. [90.88.13.173]) by smtp.gmail.com with ESMTPSA id g2sm5584533wmh.0.2019.06.27.03.27.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 03:27:49 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org, Ard Biesheuvel Subject: [PATCH v3 01/32] crypto: arm/aes-ce - cosmetic/whitespace cleanup Date: Thu, 27 Jun 2019 12:26:16 +0200 Message-Id: <20190627102647.2992-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190627102647.2992-1-ard.biesheuvel@linaro.org> References: <20190627102647.2992-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 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.20.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)];