Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10940267ybi; Thu, 25 Jul 2019 07:22:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4QHsYYmeF1H9Fli90AafIaF0UARtmnrDIo7CW+KTR3k5RSRGb+a9F9Y5RDYdcQYxLFeMj X-Received: by 2002:a63:b346:: with SMTP id x6mr86899445pgt.218.1564064538983; Thu, 25 Jul 2019 07:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564064538; cv=none; d=google.com; s=arc-20160816; b=AzoZy/gP+gKO8Mw95mxiXYRQNXXhXgv1lhQwWdYQ4SqCl0Wew022STawGcvk3mQQiy +d6E1Yteq0Wg5/ohQl7FlfPxeN+FaI/dx0f2j6f4qBkv/G+OtXDnLrgAa7AZ3g29F/Mi 83F6RV2CHr9t5k2HzSSXi5H2nPqep5BRTEfjZzSSiOWGdk+5mttd86fEVH6RmpYyF72d yxf8X5a2AIcZYxAhw+v826zY4p0Qyf5leBGLKekaCR5ojVya53KxCorQZoKOL+4rdC1r tCPyWysXmpRAEA6yvnbr1hogvb+H//TshyJkZxa7n/5eXkOdRys4F8R7e16zJjJBhRi/ RbCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=BKRUUVAvYDmRBb2sHGytH98F5v8hInjovcBeG8h+iqw=; b=D1AcxiFj10U5DcCdAcQCkcpF8MukXK9e7uQGYxk5VVnJQB7BeXnCBKeXsiBh7xIRN0 YBLj5JVnYa8xgIooaZ1QZ8Tf4QDrNCX2W8PFbJi3xv7OkfP4fpN59IdS9vMqwrXhrfDW smjS7Av/OYMQRP8ALb/V1nhbCOZUzBx/6mtnQSuzjftRtHpLphLXgLgtakERsz2heH2q YLvbZ+90HNiec1rpr/kiKKkP6Dk7ZlMugyJ+or91cQJAZB/jKOTUzZw00Jp3OwHfxj47 PaSp4mSyK/NCpJrnkM+HFm1Fm/759ntGou6ZzqukPweHSVLnPdnRbTGFyuc5QozwaWwG vgVQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si16848735pgl.7.2019.07.25.07.22.04; Thu, 25 Jul 2019 07:22:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390436AbfGYNrc (ORCPT + 99 others); Thu, 25 Jul 2019 09:47:32 -0400 Received: from inva021.nxp.com ([92.121.34.21]:47866 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390316AbfGYNrb (ORCPT ); Thu, 25 Jul 2019 09:47:31 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A8283200716; Thu, 25 Jul 2019 15:47:29 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9AB60200710; Thu, 25 Jul 2019 15:47:29 +0200 (CEST) Received: from lorenz.ea.freescale.net (lorenz.ea.freescale.net [10.171.71.5]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 502B8205E8; Thu, 25 Jul 2019 15:47:29 +0200 (CEST) From: Iuliana Prodan To: Herbert Xu , "David S. Miller" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: [PATCH 0/2] crypto: validate inputs for gcm and aes Date: Thu, 25 Jul 2019 16:47:09 +0300 Message-Id: <1564062431-8873-1-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Added inline helper functions to check authsize and assoclen for gcm and rfc4106. Added, also, inline helper function to check key length for AES algorithms. These are used in the generic implementation of gcm/rfc4106 and aes/aes_ti. Iuliana Prodan (2): crypto: gcm - helper functions for assoclen/authsize check crypto: aes - helper function to validate key length for AES algorithms crypto/aes_generic.c | 7 ++++--- crypto/aes_ti.c | 8 ++++---- crypto/gcm.c | 41 +++++++++++++++------------------------- include/crypto/aes.h | 17 +++++++++++++++++ include/crypto/gcm.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 33 deletions(-) -- 2.1.0