From patchwork Sun Jul 9 13:59:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 700824 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp4741164wrs; Sun, 9 Jul 2023 07:02:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlFbEQmL5Kcq+1iE8OQ+oYeEMrJzk5vCQjoM3c0rpZD1fQy1FMHW6XUEdC3G92d+etedtoz2 X-Received: by 2002:ac8:5713:0:b0:400:a6f4:7a1e with SMTP id 19-20020ac85713000000b00400a6f47a1emr14531438qtw.24.1688911367207; Sun, 09 Jul 2023 07:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688911367; cv=none; d=google.com; s=arc-20160816; b=ECU2CLAyq/pWJ/fJ8fHgfxCWDjl9pTwmj9SLC6XVZS4W5kx+DOds9qVr9jCW4RRGOm zAoR59y8gQNpPYEgvEQ2m9LlujQwQ8lkGVSi1kTltFubBdPiUu2HQmkMfgOEn+1R4W59 2C/JVN7Fr+kBFybKgsKRo+yscFyZcqmyXosFQlMWOoW6XpNXmHQCYwhib/ebkEHRN0VD zeIDHtWYuTzyt0UsRUb+bdV93rZ7DOKG19JcSvl7SVa3ueakep/Ajhs1IT/IBDCkTpKO ISbXlWXes4CkFbvo1vcJGu7JlNmI3ezIylJo+tDakW1dvtPGPU2i1vgx3CV3XrwCJOdP EYYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LO6Chl8aQYLOaHq+kw102b8WCIYofNouZUqxF+V9shk=; fh=4+sHc5gSB+vLQ14VCh2E8zYmyDBpEZkIg4SetDCy+NM=; b=hLgjXB3l4s7cb9NbnHitfoWrjukmdPtQhrhBtZhjz5OrYO83G/3fD4b9DGUhlum/Uq PrpORpVjW+aBldQPtdQLiKIj//3Zx5n356eLkZp4cPL3jEIQ9QaDoYa5uwwzAFUFhWE/ JG6Bgn1XQkiFYWCOEs7ww8rquqM6EUsTna4QV9x2CwHiAK2CNfwHOb2H4agfGqF7YL0K jrUv3w8XqSHRBNzxdKf81l+AkE4oeueSiE0iBIT6yZDi4uXnAs+hIu7+tSfSzIks1Ohj kujYB87Uuk24HzEVttNsZyXpdAsaI7DxTK8CcRuJHY0BJCI2pM4DQUexZhufYLHNruy3 blUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gl3oLWxK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e13-20020ac85dcd000000b003f50efce557si4672469qtx.233.2023.07.09.07.02.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2023 07:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gl3oLWxK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIUxi-0000bN-6I; Sun, 09 Jul 2023 10:00:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qIUxY-0000Te-Qm for qemu-devel@nongnu.org; Sun, 09 Jul 2023 10:00:23 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIUxW-0000f4-5u for qemu-devel@nongnu.org; Sun, 09 Jul 2023 10:00:20 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fb4146e8fcso27208425e9.0 for ; Sun, 09 Jul 2023 07:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688911216; x=1691503216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LO6Chl8aQYLOaHq+kw102b8WCIYofNouZUqxF+V9shk=; b=gl3oLWxKECjToR8Q7LAff5mTQBwoAraMppSlVJOiIAtObDzQwAP9shQ/CnX1w4YBGB OglhGL7H8cTwksAmZI1u5pibQBXDsXNeh29RxP7fy9voLyBEdlFrnHqAKg827YyFxwfs XAK//UTZA9Ord5/QNgvG67FVfp/HeQMp4OaSo+Yk+PVor8OHlXqh2am6CbhCaD1wzade YrINPzsw+wURACRij+lzcZRucsi7Jp3udO/nDpyrdWFhEIYDsISEAd2PcrOMD3jYYCZf 8wWNh2Z0NwvbZvFP3/+5MnomVVaHbGurVaR7b0uDepPtVQ3nz39u6KKZkuabphCmQZ1J wsYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688911216; x=1691503216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LO6Chl8aQYLOaHq+kw102b8WCIYofNouZUqxF+V9shk=; b=QaPPR/ZnSNrJ+YXRFu52YkWivJ6v7P8YvNkW7oYLTGh6UIh48vdkTYhuS8xyn8l4by H/IlPJP5tkzafiAmUthnBgenslY4v4vJI/th9/680/CgBd9sBSxbMZF2OgMQ4DBqdOFu UIyolRqhNyPpVmvghCbJ3zXDzf6qlevd+Fio/Trh/SmfGCVItDk0Llk5HMtp7/SBiJfa 1TMmBGeCwAwO0iIbT0jgtAY47BcDKHEeT6vIrzEk3bvqBxuQ8IVYaaTIvOW14MqLamJQ 6idGS9gehSWqsPDvqJ5A0u+wGBkSythcfF2QaPOJJiLsc+kCLYw7cMEm+vyx2fQMYsX7 xBsg== X-Gm-Message-State: ABy/qLaAcoyd8j1lgeQjBcj6g/rKtWYrpjxvfAti+E1IaBYVIpexEL27 67tGXN0l4nm9eTYKmBcSaCEVd5eMjyjkja4EBzgYNw== X-Received: by 2002:a05:600c:d4:b0:3fb:af9a:bf30 with SMTP id u20-20020a05600c00d400b003fbaf9abf30mr9450546wmm.2.1688911216306; Sun, 09 Jul 2023 07:00:16 -0700 (PDT) Received: from stoup.. ([148.252.133.210]) by smtp.gmail.com with ESMTPSA id v18-20020a5d6792000000b003063a92bbf5sm9239422wru.70.2023.07.09.07.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 07:00:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 34/37] crypto: Remove AES_shifts, AES_ishifts Date: Sun, 9 Jul 2023 14:59:42 +0100 Message-Id: <20230709135945.250311-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230709135945.250311-1-richard.henderson@linaro.org> References: <20230709135945.250311-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These arrays are no longer used, replaced by AES_SH_*, AES_ISH_*. Acked-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/crypto/aes.h | 4 ---- crypto/aes.c | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/include/crypto/aes.h b/include/crypto/aes.h index 24b073d569..aa8b54065d 100644 --- a/include/crypto/aes.h +++ b/include/crypto/aes.h @@ -30,10 +30,6 @@ void AES_decrypt(const unsigned char *in, unsigned char *out, extern const uint8_t AES_sbox[256]; extern const uint8_t AES_isbox[256]; -/* AES ShiftRows and InvShiftRows */ -extern const uint8_t AES_shifts[16]; -extern const uint8_t AES_ishifts[16]; - /* AES MixColumns, for use with rot32. */ extern const uint32_t AES_mc_rot[256]; diff --git a/crypto/aes.c b/crypto/aes.c index c765f11c1e..00e16d3f92 100644 --- a/crypto/aes.c +++ b/crypto/aes.c @@ -114,23 +114,9 @@ const uint8_t AES_isbox[256] = { /* AES ShiftRows, for complete unrolling. */ #define AES_SH(X) (((X) * 5) & 15) -const uint8_t AES_shifts[16] = { - AES_SH(0x0), AES_SH(0x1), AES_SH(0x2), AES_SH(0x3), - AES_SH(0x4), AES_SH(0x5), AES_SH(0x6), AES_SH(0x7), - AES_SH(0x8), AES_SH(0x9), AES_SH(0xA), AES_SH(0xB), - AES_SH(0xC), AES_SH(0xD), AES_SH(0xE), AES_SH(0xF), -}; - /* AES InvShiftRows, for complete unrolling. */ #define AES_ISH(X) (((X) * 13) & 15) -const uint8_t AES_ishifts[16] = { - AES_ISH(0x0), AES_ISH(0x1), AES_ISH(0x2), AES_ISH(0x3), - AES_ISH(0x4), AES_ISH(0x5), AES_ISH(0x6), AES_ISH(0x7), - AES_ISH(0x8), AES_ISH(0x9), AES_ISH(0xA), AES_ISH(0xB), - AES_ISH(0xC), AES_ISH(0xD), AES_ISH(0xE), AES_ISH(0xF), -}; - /* * MixColumns lookup table, for use with rot32. */