Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by krbdev.mit.edu (8.9.3p2) with ESMTP id PAA27373; Thu, 12 Feb 2004 15:00:31 -0500 (EST) Received: from melbourne-city-street.mit.edu (MELBOURNE-CITY-STREET.MIT.EDU [18.7.21.86]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id i1CK0V5h015046 for ; Thu, 12 Feb 2004 15:00:31 -0500 (EST) Received: from mit.edu ([18.101.0.226]) (authenticated bits=56) (User authenticated as raeburn@ATHENA.MIT.EDU) by melbourne-city-street.mit.edu (8.12.4/8.12.4) with ESMTP id i1CK0UTC028563 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NOT) for ; Thu, 12 Feb 2004 15:00:30 -0500 (EST) Date: Thu, 12 Feb 2004 15:00:30 -0500 Subject: Re: [krbdev.mit.edu #2229] IV problem with AES (krb5-1.3.2 beta2) Content-Type: text/plain; charset=US-ASCII; format=flowed MIME-Version: 1.0 (Apple Message framework v553) From: Ken Raeburn To: rt-comment@krbdev.mit.edu Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <1BE87308-5D96-11D8-ADEC-000A95909EE2@mit.edu> X-Mailer: Apple Mail (2.553) RT-Send-Cc: X-RT-Original-Encoding: us-ascii Content-Length: 1139 On Thursday, Feb 12, 2004, at 08:14 US/Eastern, Wyllys Ingersoll via RT wrote: > 3DES does not appear to have the same problem. One (admittedly ugly) > fix would be to have dk_encrypt/decrypt check the enctype before > updating the IV and only do it for 3DES. Right on both counts ... it is a simple fix, and it's ugly. :-) > For AES, is it correct to use the final block as the next IV > (currently being done in dk_encrypt/decrypt) or the n-2 block > (which is what happens in aes.c) ? Because CTS is an odd mode > that swaps the final 2 blocks, it makes choosing the IV a little > trickier. Having the last block be incomplete makes things even trickier if you use it. The updated drafts getting submitted clarify that for AES-CTS it's the next to last block (the one that would be the final block in "normal" CBC if it were not for the swap). > Why was CTS chosen again??? :) Dropping the padding, especially for AES with its larger block size. And to widen the spec and exercise the code so that we can deal with something that isn't plain old CBC with padding, which clearly is giving us a little trouble... Ken