Subject: [hiprg] A more byte efficient ESP suite

From: Robert Moskowitz <[email-masked]>
Date: Wed, 09 Feb 2011 17:13:13 -0500

I have been pushed by a number of engineers working in resource 
constrained networks to 'fix' the ESP per IP packet overhead.  Many just 
want to use dTLS, as (in theory) it could be spaning multiple IP 
datagrams (though I wonder if that is frequently true in these use 
scenarios).

So please help me with my analysis:

ESP takes at most 12 bytes:

4    SPI
4    Seq#
4    padding  (though I would really like to get a better understanding 
of padding overhead)

CCM (the primary candidate) takes:

8         IV
8-16    ICV

So ESP-CCM is 28-36 bytes.

But if your IV for CCM is a counter, and not a LFSR, and you use the ESP 
ESN, you 'compress' out the 8 byte IV from CCM for 20-28 bytes.

Now note that when we were first doing CCM for ESP, I proposed this and 
actually did a rough draft, but Steve Kent insisted that LFSR be 
supported as well and that the IV always be explicit, giving us the CCM 
cipher for ESP we have today.

8 bytes IS a big deal to constrained networks (10% of the datapayload on 
802.15.4).  Has there been any discussions anywhere on this sort of 
optimization?