From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 246EFC433F5 for ; Mon, 10 Jan 2022 17:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mI3O6WOw1DnW2tLRRfbTZfNCj6qd4WNeehR847fb2GA=; b=rtNdfoByg3SFsO ST7FaDu9qM8Utxg6iu62olAOiQm+WbdYaoT4qTmifss+/ShuhFNS3ickUWCOa9edPd8x1bO5FbdX0 3Tvapep2++Gt5JEh2gPZatbSb06ym05WlHfYAJaefZbAYiYPC6PWJuWs/xmB6AJgGLXktbGZfE/x1 3PZyqCai+JyAa6fwG7mjizNLU8/dI0IHetL3+CSCcPy1D1yhzmjiSWCBAAo83sTiwqc3HjDUJ6qn8 oNYBKtkHnUXMKnr+Snt738J+ngFMAT7BGnKFAmVfQS8TIUWc6o8tXmhGKe5I0G1kmKceyUCAWcs3l zs+OGLSwg37P7AEwd2qA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6ymT-00Cd89-Ve; Mon, 10 Jan 2022 17:48:30 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6ymP-00Cd6Y-HW for linux-arm-kernel@lists.infradead.org; Mon, 10 Jan 2022 17:48:27 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8AE5160B59; Mon, 10 Jan 2022 17:48:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABFA4C36AE3; Mon, 10 Jan 2022 17:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641836904; bh=KiOlz2TRaGGfIu+ZWVRftSJ3vEG+bot8fE4I4Q+0ZwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q8Hq/T3nLaXInhFlON+FbegXUxwsn/Y96nFIghTKOLRZq5r8s53cIZ/Cej05eCCPr 3ARyRyl+64UKnqhXonsCu70rUcV9RTPAcXnAF/4cJy/lltgeSMA0fUfpsSLZY0eeLL z15RDsN82q2VNWlgiYLxQB/NUXdT2ScpDclFOGt5ao6ecXIgURVjxqePBwvfAM7WPO +NfgpZD0kHBHLLKHdYSGnY+jWvv77NXJBXqD/mYKiAfliU4VDfVDlDoJiMkTvocgKb Kurm9AJMBoQxZ1Hv4I4TMGWHGOTtVc3unCMRkRNYSfL7TYbbaadFVsFmDIioQjPti4 ZD1l2JNHCygtA== Date: Mon, 10 Jan 2022 09:48:22 -0800 From: Eric Biggers To: Peng Luo Cc: herbert@gondor.apana.org.au, davem@davemloft.net, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, terrelln@fb.com, linux-crypto@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: testmgr - fix some wrong vectors of aes-ccm Message-ID: References: <20220109170239.4322-1-wuhanluop@163.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220109170239.4322-1-wuhanluop@163.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220110_094825_671023_BA4E9BBB X-CRM114-Status: GOOD ( 20.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 10, 2022 at 01:02:39AM +0800, Peng Luo wrote: > Some vectors of aes-ccm are wrong. > This patch has been tested with kernel 4.9 and openssl1.1.1k. > > Signed-off-by: Peng Luo > --- > crypto/testmgr.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/crypto/testmgr.h b/crypto/testmgr.h > index a253d66ba1c1..ff171fe53979 100644 > --- a/crypto/testmgr.h > +++ b/crypto/testmgr.h > @@ -19865,8 +19865,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = { > "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a" > "\x86\xb0\x87\x6b\x62\x33\x8c\x34" > "\xce\xab\x57\xcc\x79\x0b\xe0\x6f" > - "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51" > - "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5", > + "\xCF\xE9\xF9\x21\x3C\x1A\xCE\x67" > + "\x62\x7B\x36\x3A\xEA\x19\xAC\x58", > .clen = 48, > .novrfy = 1, > }, { > @@ -19952,8 +19952,8 @@ static const struct aead_testvec aes_ccm_tv_template[] = { > "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37" > "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa" > "\x64\x19\xc0\x30\xd7\xfc\x14\x6b" > - "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f" > - "\xa9\xb4\x2d\x68\x03\xa3\x44\xef", > + "\x08\x5A\x20\x4A\xB0\x2C\xF9\x49" > + "\x10\x1C\x9C\x85\x8C\x12\xE0\x3A", > .clen = 48, > .novrfy = 1, > }, { > @@ -19983,7 +19983,7 @@ static const struct aead_testvec aes_ccm_tv_template[] = { > "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39" > "\x89\xd4\x75\x7a\x63\xb1\xda\x93", > .plen = 32, > - .ctext = "\x48\x01\x5e\x02\x24\x04\x66\x47" > + .ctext = "\x14\x01\x5e\x02\x24\x04\x66\x47" > "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd" > "\xa5\xa9\x87\x8d\x84\xee\x2e\x77" > "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6" This patch causes a self-test failure: [ 22.354527] alg: aead: ccm_base(ctr-aes-aesni,cbcmac(aes-aesni)) decryption unexpectedly succeeded on test vector 16; expected_error" [ 22.355843] ------------[ cut here ]------------ [ 22.356306] alg: self-tests for ccm_base(ctr-aes-aesni,cbcmac(aes-aesni)) (ccm(aes)) failed (rc=-22) Please be more specific about what is wrong. Also, please test with the latest upstream kernel, not v4.9 which is over 5 years old. - Eric _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel