Re: [IPsec] Comments on draft-ietf-lwig-minimal-esp-00

Daniel Migault <mglt.ietf@gmail.com> Mon, 02 November 2020 17:12 UTC

Return-Path: <mglt.ietf@gmail.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 13CE33A0D37; Mon, 2 Nov 2020 09:12:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 DtWT2lvw8lM6; Mon, 2 Nov 2020 09:12:15 -0800 (PST)
Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (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 7286D3A0D2E; Mon, 2 Nov 2020 09:12:15 -0800 (PST)
Received: by mail-vs1-xe34.google.com with SMTP id e3so7866703vsr.8; Mon, 02 Nov 2020 09:12:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6+8tfa3DLnRVU0Gz16644OBsn0norlE1LPN6kQE8BdM=; b=obUI73ANyV1s9xkzzDq/HjZM3F5aQiTrsLVUCBEsktzjeb2PPeWvYgLR8zf5cunO4N BoRaKT18iyI53Lb6Q+VjWAITzZsKuctuUfal3OC28xEXbsituvUAFzO9pwkSIPKyDsUx ohpjVS2lEWBKDfMYz+OGBXMW/CgooLKGUZTKh2YfxlGkOQJ8OT2NHhhfoDMkMMbRgVPH p17A5rgnZu5j+8SJ6X/Rj+fmBkWWPpBtKUp9/sdMoKyxM4Zs8dE8mHjndI4OBk/M3orm 2qW7TbipzmLmkRkd2TI9DYqnt/KyU4wq8rqlQoZF4Zcs2cDCuRfuyLAhhE8Qm53gQoIb eKlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6+8tfa3DLnRVU0Gz16644OBsn0norlE1LPN6kQE8BdM=; b=uMXzeZ0yWmNwF4qsl+PKwDLloEwsOcES0Y3jz/cB119K7mvWnjXYhAFH5n0W8/uvx9 h6ToKmwh432eRda1nCr4zxduWw5JuUWCyEdzeV8nOHys6LB3o5NrqCUJswseCDog6Ody yLlkRD/o+AGYRoPID/MbzQrzwrZLvobUGACBuktjvmZZatkXWCrS9vXTNNEGYuBLoOBn +MbJ9Ug/Zx9R50REBZvEaJkNIBJBc1zTASMT5YpazLd1STUzoRCe03GnBGg41X0yzNsA Q6uAin9dNNvwE/TKocjoB5WFMlR4ssR6I+GIsIRJrm7qZQfvyJk9ulsU1F7lsTvvB6f5 zFnQ==
X-Gm-Message-State: AOAM531ckVAkzT/oxJEKrp+0LamKYvbke1Ky0pHUelYsmZk3iJyw0Wcx NaAAX0auO+mX6Aw9PQh0HQ8TPdTwijCr4bx8/c4=
X-Google-Smtp-Source: ABdhPJze8XigyrVX9XOuW66zUVKpCtI1bgyRuPvkiwLHJownkRTyIlpoEZrdY1Iv/1CIG2eKtTuESIU0S+fGj2VQhxg=
X-Received: by 2002:a05:6102:309a:: with SMTP id l26mr2604563vsb.4.1604337134578; Mon, 02 Nov 2020 09:12:14 -0800 (PST)
MIME-Version: 1.0
References: <MN2PR11MB3871D71922DC05E087BDF992C1C40@MN2PR11MB3871.namprd11.prod.outlook.com> <CADZyTkn-sn9Txfj9R9j8o97jKwrkcRWkfLrvsu4WkZ-WHkVNKA@mail.gmail.com> <24476.26053.16496.150596@fireball.acr.fi> <CADZyTkmTr3jna3_=j__s=yYw4PXJ6mrO7hoNp=Zp+Are56Y8EA@mail.gmail.com> <24480.4335.981375.920639@fireball.acr.fi>
In-Reply-To: <24480.4335.981375.920639@fireball.acr.fi>
From: Daniel Migault <mglt.ietf@gmail.com>
Date: Mon, 02 Nov 2020 12:12:03 -0500
Message-ID: <CADZyTkkqBxnGynf5jyOxpmExAdCe6dCSek3XGKbP2hjEZrkOgg@mail.gmail.com>
To: Tero Kivinen <kivinen@iki.fi>
Cc: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>, "ipsec@ietf.org" <ipsec@ietf.org>, lwip@ietf.org
Content-Type: multipart/alternative; boundary="00000000000001af7805b322d970"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/aBBIZAeRP1x5ALtLsvfUtvHbmlw>
Subject: Re: [IPsec] Comments on draft-ietf-lwig-minimal-esp-00
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Nov 2020 17:12:17 -0000

Thanks for the response and the reference. The Security Considerations
referred to 4086, but I thought that it would be useful to add the
reference from the nist. I have added the following sentence.

"""
In addition [SP-800-90A-Rev-1] provides appropriated guidances to build
random generators based on deterministic random functions.
"""
I believe that we do not necessarily need to go into more details that are
related to specific transforms, but I am happy to hear otherwise.

Yours,
Daniel

On Mon, Nov 2, 2020 at 9:00 AM Tero Kivinen <kivinen@iki.fi> wrote:

> Daniel Migault writes:
> > <mglt>
> > Correct. it must be a  MUST. I also explicitly added that condition on
> nonce
> > and counter needs to remain valid. The new text is as follows:
> >
> > When such mechanisms cannot be implemented and the session key is, for
> > example, provisioned, the nodes MUST ensure that keys are not used beyond
> > their life time and that the appropriate use of the key remains across
> reboots
> > - e.g. conditions on counters and nonces remains valid.
> >
> > </mglt>
>
> Looks ok.
>
> >     Normally you use just counter, and encrypt it with secret key. The IV
> >     in CBC does not be random, it needs to be unpredictable and it should
> >     not be direct counter or other source with low Hamming distance
> >     between successive IVs.
> >
> >     Actually the problem with old way of CBC mode was that the IV was
> >     random, but predictable as implementations used last block of
> previous
> >     packet. If attacker does not know the key you are using to encrypt
> the
> >     counter to generate IVs, the IVs will be unpredictable and random.
> >
> > <mglt>
> > Thanks for the information. What I was wondering then, is for which
> reason
> > can't we consider this as a random generator - of a limited lifetime.
> > </mglt>
>
> That method is very common piece used when you are making random
> number generator. It is for example part of the NIST AES Counter mode
> based generator, but to properly make random number generator out of
> that need bit more stuff around it. For example you need to make sure
> it is rekeyed before the counter rolls over, and of course it is only
> as secure as the random secret key you are using to seed it etc.
>
> See NIST SP 800-90A REv 1 [1] CTR_DRBG description for more
> information.
>
> [1] https://csrc.nist.gov/publications/detail/sp/800-90a/rev-1/final
> --
> kivinen@iki.fi
>


-- 
Daniel Migault
Ericsson