Re: [6lo] [IPsec] Diet-ESP

Daniel Migault <mglt.ietf@gmail.com> Wed, 18 February 2015 02:38 UTC

Return-Path: <mglt.ietf@gmail.com>
X-Original-To: 6lo@ietfa.amsl.com
Delivered-To: 6lo@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C92121A8955; Tue, 17 Feb 2015 18:38:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i2qJoncgEs03; Tue, 17 Feb 2015 18:38:10 -0800 (PST)
Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 89AED1A702B; Tue, 17 Feb 2015 18:38:09 -0800 (PST)
Received: by mail-wi0-f172.google.com with SMTP id l15so37930395wiw.5; Tue, 17 Feb 2015 18:38:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gPV5jLLFefuzI1YKvncHFyc7RdoLh8oU2bSkxW9Bzq4=; b=YsfSQnGscjXt7EQObcHwTJ4XWyWNl/IY+XhxeAjt0rEHXL2o09ILj3ODlJZj7hhPTb VeKonom6S+3QXeH+Np+4al+VOejtJgWVXhWDPpXO59yeX4cACAmhx7RJbua+/6fInlun +eBjUOzCZq2qafCI114Ldv7va8I4qnijl3AhCT6a7jDeaJYoyoW0ishg/xpc6r6/i+1+ JcV2e87XFhbNf2qjfr4e1fypJGk9bXyO1hVq/ILtofPj7rLOge7Y7sIVghIdlplAy4ds FJFRo0fxY9lPsZUkSVxrF8D7mxLU3mDKH/IFsvENS5PyTrlO20GaTRjKjS1TChD2vd8u uklw==
MIME-Version: 1.0
X-Received: by 10.181.13.39 with SMTP id ev7mr366748wid.3.1424227088291; Tue, 17 Feb 2015 18:38:08 -0800 (PST)
Received: by 10.194.68.39 with HTTP; Tue, 17 Feb 2015 18:38:08 -0800 (PST)
In-Reply-To: <A113ACFD9DF8B04F96395BDEACB340420D03A72F@xmb-rcd-x04.cisco.com>
References: <CADZyTkkqjSQe1HvMhLqg1g1-bxGc3iXB8kjL81qJgieCwV6h8Q@mail.gmail.com> <A113ACFD9DF8B04F96395BDEACB340420D03A28E@xmb-rcd-x04.cisco.com> <CADZyTkmssqtDFfLAae19w0-rxdiiE3TopgB21LbiEE1O-mQA=g@mail.gmail.com> <A113ACFD9DF8B04F96395BDEACB340420D03A72F@xmb-rcd-x04.cisco.com>
Date: Wed, 18 Feb 2015 03:38:08 +0100
Message-ID: <CADZyTkkfjBOwQsCPmN1qtc0vrhhMnOEjdUiLyRWFUBafsOTwNQ@mail.gmail.com>
From: Daniel Migault <mglt.ietf@gmail.com>
To: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>
Content-Type: multipart/alternative; boundary="f46d043be268ad59ec050f53b573"
Archived-At: <http://mailarchive.ietf.org/arch/msg/6lo/6vqYo-HXVnxoJZVu2g-ljLrqA0Y>
Cc: "ipsec@ietf.org" <ipsec@ietf.org>, "6lo@ietf.org" <6lo@ietf.org>
Subject: Re: [6lo] [IPsec] Diet-ESP
X-BeenThere: 6lo@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Mailing list for the 6lo WG for Internet Area issues in IPv6 over constrained node networks." <6lo.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6lo>, <mailto:6lo-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/6lo/>
List-Post: <mailto:6lo@ietf.org>
List-Help: <mailto:6lo-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6lo>, <mailto:6lo-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Feb 2015 02:38:13 -0000

Hi Scott,

Thanks for the feed back, this is clearly some text that needs to be added
to draft. So options to deal with the compression of the ICV are:
    - a) Allowing ICV compression with some restrictions like the ones you
mention.
    - b) Not allowing ICV compression and explicitly listing encryption
algorithms with small ICV

BR,
Daniel




On Tue, Feb 17, 2015 at 10:17 PM, Scott Fluhrer (sfluhrer) <
sfluhrer@cisco.com> wrote:

>  Others have addressed my other points; let me talk about the specific
> issues with GCM.
>
>
>
> One summary of the issues found is
> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.297.9568&rep=rep1&type=pdf
> ; the problem with GCM is that:
>
> -          With one successful forgery, the attacker can modify other
> packets the same way without detection.
>
> -          With a handful of successful forgeries, the attacker can learn
> enough to be able to forge arbitrary messages.
>
> Now, with the full 16 byte ICV, this is not a concern (because the
> probability of the attacker finding one successful forgery is tiny);
> however once you start reducing the ICV value, well, various guessing
> strategies start working better.
>
>
>
> Now, neither HMAC nor CMAC has this problem; yes, with a tiny ICV, someone
> can generate a forgery by blindly guessing; however a successful forgery
> doesn’t give the attacker any information about how to generate a second
> successful forgery, or any information about the internal state.  Instead,
> generating a second forgery requires just as much work as you’d expect
> (that is, the same amount of work taken to generate the first forgery).
>
>
>
> Hence, while I would suggest that you rethink the strategy of allowing
> tiny ICVs, if you do go ahead, I would strongly urge you to mandate the use
> of either HMAC or CMAC to generate those tiny ICVs – those won’t make a
> poor situation even worse.
>
>
>
>
>
> *From:* Daniel Migault [mailto:mglt.ietf@gmail.com]
> *Sent:* Tuesday, February 17, 2015 10:48 AM
> *To:* Scott Fluhrer (sfluhrer)
> *Cc:* 6lo@ietf.org; ipsec@ietf.org
> *Subject:* Re: [IPsec] Diet-ESP
>
>
>
> Hi Scott,
>
> Thank you for the feed back. I agree that compressing the ICV reduces
> security related to authentication. Let's call this a "weak
> authentication".
>
> I am not saying it is a valid argument, but since IPsec enables NULL
> authentication too, we considered that enabling "weak authentication" would
> be possible with a clear warning in the security consideration.
>
> The reason we are looking we are looking for weak authentication is to be
> able to balance authentication with bandwidth optimization. In fact,
> suppose you compute the mean/median over a thousand different value, that
> one or two values are corrupted may not have much impact overall, and we
> may prefer to extend the life time of the mote for 5 years instead.
>
>
> Regarding you comment I think the issue ou raised is more related to GCM.
> -- By the way I would be interested to have a description or relevant doc
> describing  why ICV in GCM particularly matters. One way to address the
> issue you raised would be:
>
>     - 1) mention the need for weak authentication in the requirement draft
>
>     - 2) remove ICV compression from Diet-ESP
>
>     - 3) Define encryption protocols with weak authentication with
> different sizes of the ICV. For example suppose AES-MODEX has an ICV of N,
> then we may need to add AES-MODEX_i with i in [0 ... N-1].
>
> The advantage of doing so is that it avoids end user to weaken the
> protocols especially when one compression is fine with one protocol but not
> with the others. In that sense it looks a better design.
>
> However, I see the following drawbacks:
>
>     - It requires to create multiple encryption protocols. Unlike
> compression, implementation cannot use existing implementation of AES-MODEX.
>
>     - Negociation for hosts accepting all AES-MODEX_i with i in [0 ...
> N-1] requires many SA payload in the IKEv2 negotiation. However, we may
> deal with this with a AES-MODEX_ALL to indicate the responder choses its
> compression.
>
>
> BR,
> Daniel
>
>
>
> On Tue, Feb 17, 2015 at 6:28 AM, Scott Fluhrer (sfluhrer) <
> sfluhrer@cisco.com> wrote:
>
> Here’s an issue with this draft; it doesn’t meet the requirements that it
> claims.  In particular, it claims that it is based on standard IPsec, and
> that its security is equivalent to IPsec (R1-R3).  However, it allows (and,
> as far as I am concerned, encourages) the use of tiny ICVs; these tiny ICVs
> introduce security vulnerabilities that do not occur within sane
> configurations of IPsec (where sane includes using an integrity
> transform).  In particular, using tiny ICVs with GCM is a known security
> issue.
>
>
>
> Now, it would be possible to have an encryption protocol that would not
> have issues with small ICVs (say, by using a wide block cipher); however
> this would be rather different than standard IPsec (in part because IPsec
> was never designed with these minimal bandwidth constraints); either we
> need to stay with an IPsec-based protocol (which implies a largish ICV), or
> go with something else (which would have less overhead, but doesn’t look
> that much like IPsec internally).
>
>
>
>
>
> Oh, and a minor note on the IV generation: it’s actually secure to use the
> same key you use to encrypt to encrypt the counter for the IV; you don’t
> need a separate key.
>
>
>
> *From:* IPsec [mailto:ipsec-bounces@ietf.org] *On Behalf Of *Daniel
> Migault
> *Sent:* Monday, February 16, 2015 10:08 PM
> *To:* 6lo@ietf.org
> *Cc:* ipsec@ietf.org
> *Subject:* [IPsec] Diet-ESP
>
>
>
> Please find the new version of Diet-ESP a compress IPsec/ESP for IoT. We
> have implemented and tested Diet-ESP. Compared to the standard IPsec/ESP,
> Diet-ESP can reduce the networking overhead added to unprotected data from
> 100% to a few percent. I will be happy to present these draft next IETF.
>
> Feel free to make comments!
>
> The drafts includes:
>     1) draft-mglt-6lo-diet-esp-requirements
> <http://datatracker.ietf.org/doc/draft-mglt-6lo-diet-esp-requirements/>:
> lists the requirements for Diet-ESP
>
>     2) draft-mglt-6lo-aes-implicit-iv
> <http://datatracker.ietf.org/doc/draft-mglt-6lo-aes-implicit-iv/>:
> indicates how to avoid carrying the IV in each ESP packet. It is instead
> generated by each peers. The protocols described in the draft can be used
> with the regular IPsec/ESP.
>
>     3) draft-mglt-6lo-diet-esp
> <http://datatracker.ietf.org/doc/draft-mglt-6lo-diet-esp/> describes the
> core Diet-ESP protocol, that is how to compress/decompress each fields of
> the standard IPsec/ESP. Compression is discribed through a Diet-ESP Context.
>     4) draft-mglt-6lo-diet-esp-payload-compression
> <http://datatracker.ietf.org/doc/draft-mglt-6lo-diet-esp-payload-compression/>:
> describes how the clear text can be compressed before encryption. In fact
> unless IPsec/ESP is used with NULL encryption, the data in the ESP packet
> is encrypted. Encryption makes compression hard to perform. Instead
> compressing before encrypting can be very efficient. This makes possible to
> remove UDP/TPC/IP tunnel headers.
>     5) draft-mglt-6lo-diet-esp-context-ikev2-extension
> <http://datatracker.ietf.org/doc/draft-mglt-6lo-diet-esp-context-ikev2-extension/>:
> describes how to negociate Diet-ESP with IKEv2. In fact this mostly result
> in an agreement for the DIet-ESP Context. This exchange may then be
> extended to Diet-HIP Exchange.
>
> BR,
>
> Daniel
>
> --
>
> Daniel Migault
> Orange Labs -- Security
> +33 6 70 72 69 58
>
>
>
>
> --
>
> Daniel Migault
>
> Ericsson
>



-- 
Daniel Migault
Ericsson