From patchwork Mon Aug 26 09:41:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shamis X-Patchwork-Id: 57890 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5416B1BFC8; Mon, 26 Aug 2019 11:24:08 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id A17241BF9F for ; Mon, 26 Aug 2019 11:24:04 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7Q9JZUJ020150; Mon, 26 Aug 2019 02:24:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=n3GTogPvba8EmqumNxDmgWCRpBBegoNheYMxUVVW1oo=; b=TZOC5HSu9r28Ir324fnYg21AqrQY2uf52Y+AbK+mlnsxxCJjhlEGMx+opPNg7z2NMkLO FTtzyQoBdeusfdsUwHdUTT+sd26eI2DKdA57/gu7i4YdKiflQt55Mlf8E0NfGRGUaVsZ LsMrQifnW4WP0No7B1gU5zQn8ttnxdBFOpiT2318PyOJMxgp2W9Lj9lgFFdNycF+GQ4/ vTutEn8RihHM4Wsms5onLW8yLadGsS0QSbE3YhfJmre/DG0CEFd0RNI2uqvt6BDGAuOw n0R4Bz1rKqLDrPzDVRukS9DTJVu8MAShBwdi5EBhFDpyo1iOx+j03NCk6Nrzi/76oUHB mA== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2uk4rke1j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 02:24:04 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 26 Aug 2019 02:24:02 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 26 Aug 2019 02:24:02 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id F3D1E3F7041; Mon, 26 Aug 2019 02:24:00 -0700 (PDT) From: To: CC: , , Date: Mon, 26 Aug 2019 12:41:15 +0300 Message-ID: <20190826094120.22590-8-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190826094120.22590-1-michaelsh@marvell.com> References: <20190826094120.22590-1-michaelsh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-26_06:2019-08-23,2019-08-26 signatures=0 Subject: [dpdk-dev] [PATCH 07/12] examples/fips: keep digest after crypto text X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Shamis Fix of GCM FIPS bug: ICV was not copied after the crypto text in decryption operation so SAM failed to check authentication in GCM mode. Signed-off-by: Michael Shamis --- examples/fips_validation/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index 895bfa7d8..1d621f60a 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -636,6 +636,10 @@ prepare_aead_op(void) } memcpy(ct, vec.ct.val, vec.ct.len); + + /* keep digest after crypto text */ + memcpy(ct + vec.ct.len, vec.aead.digest.val, + vec.aead.digest.len); sym->aead.data.length = vec.ct.len; sym->aead.digest.data = vec.aead.digest.val; sym->aead.digest.phys_addr = rte_malloc_virt2iova(