Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753217AbcLHLaP (ORCPT ); Thu, 8 Dec 2016 06:30:15 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:39726 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752249AbcLHLaN (ORCPT ); Thu, 8 Dec 2016 06:30:13 -0500 Message-ID: <58494432.3010102@huawei.com> Date: Thu, 8 Dec 2016 19:29:54 +0800 From: "Longpeng (Mike)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Jussi Kivilinna CC: , , Gonglei , "Zhoujian (jay, Euler)" , "Wubin (H)" , Subject: Re: Question about ctr mode 3des-ede IV len References: <584803E4.1040704@huawei.com> <493854a6-4e80-849a-cffb-e2f5a29a009e@iki.fi> In-Reply-To: <493854a6-4e80-849a-cffb-e2f5a29a009e@iki.fi> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.246.209] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 33 Hi Jussi, On 2016/12/7 21:15, Jussi Kivilinna wrote: > 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. > Thank you very much. :) > -Jussi > >> >> Thank you. :) >> > > . > -- Regards, Longpeng(Mike)