From: Mikulas Patocka Subject: Re: [PATCH] dm-crypt: disable block encryption with arc4 Date: Mon, 25 Jan 2010 13:39:48 -0500 (EST) Message-ID: References: Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="279731514-2096129439-1264444788=:18309" Cc: Milan Broz , Alasdair G Kergon , linux-crypto@vger.kernel.org To: dm-devel@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11225 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753165Ab0AYSj4 (ORCPT ); Mon, 25 Jan 2010 13:39:56 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0PIdtMQ011275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Jan 2010 13:39:55 -0500 In-Reply-To: Sender: linux-crypto-owner@vger.kernel.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --279731514-2096129439-1264444788=:18309 Content-Type: TEXT/PLAIN; charset=US-ASCII BTW. I created a script that tests all possible ciphers, keysizes, chaining modes and iv modes for dm-crypt. arc4 is the only one that fails. You can add it your regression testsuite if you want. Mikulas --279731514-2096129439-1264444788=:18309 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=test-cipher Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: test-cipher Content-Disposition: attachment; filename=test-cipher IyEvYmluL3NoDQpkbXNldHVwIHJlbW92ZSBjcjANCnNldCAtZQ0KY2lwaGVy PSIkQCINCmNyeXB0c2V0dXAgLWQga2V5ICRjaXBoZXIgY3JlYXRlIGNyMCAv ZGV2L3JhbTANCm1rZnMuZXh0MyAtYiAxMDI0IC9kZXYvbWFwcGVyL2NyMA0K ZnNjay5leHQyIC1mbiAvZGV2L21hcHBlci9jcjANCmRtc2V0dXAgcmVtb3Zl IGNyMA0KY3J5cHRzZXR1cCAtZCBrZXkgJGNpcGhlciBjcmVhdGUgY3IwIC9k ZXYvcmFtMA0KZnNjay5leHQyIC1mbiAvZGV2L21hcHBlci9jcjANCmRtc2V0 dXAgcmVtb3ZlIGNyMA0K --279731514-2096129439-1264444788=:18309 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=cryptest Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: cryptest Content-Disposition: attachment; filename=cryptest IyEvYmluL3NoDQpzZXQgLWUNCj5sb2cNCiMgYXJjNCAtIGRvZXNuJ3Qgd29y aw0KZm9yIGNpcGhlciBpbiBhZXMgYW51YmlzIGJsb3dmaXNoIGNhbWVsbGlh IGNhc3Q1IGNhc3Q2IGRlcyBkZXMzX2VkZSBmY3J5cHQga2hhemFkIHNlZWQg c2VycGVudCB0bmVwcmVzIHRlYSB4dGVhIHhldGE7IGRvDQoJaWYgWyAtbiAi JDEiIC1hICIkY2lwaGVyIiAhPSAiJDEiIF07IHRoZW4NCgkJY29udGludWUN CglmaQ0KCWlmIFsgJGNpcGhlciA9IGFlcyBdOyB0aGVuDQoJCWtleXNpemVz PSIxMjggMTkyIDI1NiINCgkJYmxvY2tzaXplPTEyOA0KCWVsaWYgWyAkY2lw aGVyID0gYW51YmlzIF07IHRoZW4NCgkJa2V5c2l6ZXM9ImBzZXEgMTI4IDMy IDMyMGAiDQoJCWJsb2Nrc2l6ZT0xMjgNCgllbGlmIFsgJGNpcGhlciA9IGFy YzQgXTsgdGhlbg0KCQlrZXlzaXplcz0iYHNlcSA4IDI1NiAyMDQ4YCAyMDQ4 Ig0KCQlibG9ja3NpemU9MQ0KCWVsaWYgWyAkY2lwaGVyID0gYmxvd2Zpc2gg XTsgdGhlbg0KCQlrZXlzaXplcz0iYHNlcSAzMiA4IDQ0OGAiDQoJCWJsb2Nr c2l6ZT02NA0KCWVsaWYgWyAkY2lwaGVyID0gY2FtZWxsaWEgXTsgdGhlbg0K CQlrZXlzaXplcz0i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