From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752847AbcLHLQK (ORCPT ); Thu, 8 Dec 2016 06:16:10 -0500 Received: from mail.kapsi.fi ([217.30.184.167]:45399 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbcLHLQH (ORCPT ); Thu, 8 Dec 2016 06:16:07 -0500 Subject: Re: Question about ctr mode 3des-ede IV len To: "Longpeng (Mike)" , jussi.kivilinna@haltian.com, herbert@gondor.apana.org.au References: <584803E4.1040704@huawei.com> Cc: Gonglei , "Zhoujian (jay, Euler)" , "Wubin (H)" , linux-kernel@vger.kernel.org From: Jussi Kivilinna Message-ID: <493854a6-4e80-849a-cffb-e2f5a29a009e@iki.fi> Date: Wed, 7 Dec 2016 15:15:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <584803E4.1040704@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 80.75.107.218 X-SA-Exim-Mail-From: jussi.kivilinna@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, 07.12.2016, 14:43, Longpeng (Mike) kirjoitti: > Hi Jussi and Herbert, > > I saw serveral des3-ede testcases(in crypto/testmgr.h) has 16-bytes IV, and the > libgcrypt/nettle/RFC1851 said the IV-len is 8-bytes. > > Would you please tell me why these testcases has 16-bytes IV ? Because I used same tool to create test-vectors which I had previously used to create AES/Camellia/Serpent/Twofish test-vectors. So, I must have forgotten to change 16-byte IV generation to 8 bytes and thus those testcases in crypto/testmgr.h have wrong length. The extra trailing 8 bytes are not used and can be removed. -Jussi > > Thank you. :) >