Re: [IPsec] Comments on draft-ietf-ipsecme-implicit-iv-05

John Mattsson <john.mattsson@ericsson.com> Sat, 22 September 2018 06:03 UTC

Return-Path: <john.mattsson@ericsson.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 E0183130DF2 for <ipsec@ietfa.amsl.com>; Fri, 21 Sep 2018 23:03:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.311
X-Spam-Level:
X-Spam-Status: No, score=-4.311 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_DKIMWL_WL_HIGH=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com header.b=ZTAKc173; dkim=pass (1024-bit key) header.d=ericsson.com header.b=WtpPF7Sp
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 AGwwqTnS0qfy for <ipsec@ietfa.amsl.com>; Fri, 21 Sep 2018 23:03:19 -0700 (PDT)
Received: from sesbmg22.ericsson.net (sesbmg22.ericsson.net [193.180.251.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C5C061271FF for <ipsec@ietf.org>; Fri, 21 Sep 2018 23:03:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1537596196; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ylWWY8aj39PgUqh3U/e2e7erqOIc4gR2iUEMwTDDCMc=; b=ZTAKc173/BGdt5re0h/+PSEI1LgfWte7p3mVBcRizCkiDeAConP4Fw+iX6XPGZwj hXttWbVm/x4D4bvA8Pyry5GngrZ/HRAOlrZPEDgc1gBuBUOJ6u5b0NiicpQyj97+ ORpKJoeDAIHgQ0TBjzUj5OsOhMXGhPlXbX0/HHK4IyM=;
X-AuditID: c1b4fb30-fe1ff700000055da-bf-5ba5db24cbf0
Received: from ESESBMB501.ericsson.se (Unknown_Domain [153.88.183.114]) by sesbmg22.ericsson.net (Symantec Mail Security) with SMTP id 1D.A9.21978.42BD5AB5; Sat, 22 Sep 2018 08:03:16 +0200 (CEST)
Received: from ESESBMB504.ericsson.se (153.88.183.171) by ESESBMB501.ericsson.se (153.88.183.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Sat, 22 Sep 2018 08:03:16 +0200
Received: from EUR04-DB3-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB504.ericsson.se (153.88.183.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Sat, 22 Sep 2018 08:03:16 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ylWWY8aj39PgUqh3U/e2e7erqOIc4gR2iUEMwTDDCMc=; b=WtpPF7SpdFTCX+RTeW3SpsnCA/EDWzzRfnWwYJlIYgNldNYFE1uTu0rcBkbm4PKcAN401MeUrjcV0Viq7106uSZhTWI8Rc3OEkUcj3kw6PD+gB1GfFL93dEeb8Hg7e2VfrVFb7AJtGmX+EGSFgdh3bS2vwkyrwGh5+ZFM/L/8io=
Received: from HE1PR07MB4169.eurprd07.prod.outlook.com (20.176.166.22) by HE1PR07MB3225.eurprd07.prod.outlook.com (10.170.246.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.11; Sat, 22 Sep 2018 06:03:15 +0000
Received: from HE1PR07MB4169.eurprd07.prod.outlook.com ([fe80::a451:7626:5a73:809]) by HE1PR07MB4169.eurprd07.prod.outlook.com ([fe80::a451:7626:5a73:809%5]) with mapi id 15.20.1164.014; Sat, 22 Sep 2018 06:03:15 +0000
From: John Mattsson <john.mattsson@ericsson.com>
To: "ipsec@ietf.org" <ipsec@ietf.org>
Thread-Topic: Comments on draft-ietf-ipsecme-implicit-iv-05
Thread-Index: AQHUS3RpShWuNfCP002LTkZsSiwDkKT7/oKA
Date: Sat, 22 Sep 2018 06:03:15 +0000
Message-ID: <BEC20EBE-8EC0-41CE-985D-B2F289EC8675@ericsson.com>
References: <E8F5CE26-BE99-43B0-90AE-67838913CDC2@ericsson.com>
In-Reply-To: <E8F5CE26-BE99-43B0-90AE-67838913CDC2@ericsson.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.11.0.180909
x-originating-ip: [95.192.79.163]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; HE1PR07MB3225; 6:vGiEi/t8M/Nhw+roFVI0E0mzcT0ld6ISgzw7LTqhz3/Q7bBhHjR6DDQKS05oVKzSvgsHzrLVV2U8YC/LPXsGaeDGscEKF1Ek6TOvsDk+D+Tibz4CCfSu+qc8Lf6NR+cXzUdWZWr9V/Fl/jVx50I+uR8vxjX+8eTsdA8ykHp+czem4MoxRnNdBJ83Dqs6LKMD1jfcal/Nz4wFgSIEI/HptOREABenq/WxO7y93kr4Svsfombe3kwb8m4l6QWTOyXkjTnVefwypDgi0vK7ytK5LfMUPVTNr8e6JyOs2q9DSXjohFQFY4O3g/+6RaDd7ESiSvYJ6sARmv7g6UEQ2P3k13b7SvojibsHvXLaEJQjh7nvya1B2gPHV+givxFDUwckMz7kDM8Ogmxl1JNx8ukHoUvdBUzw1WEMuXtOFxjBfzrIiNklxu3u/jwvtAyT/ce9WCkUYfca6luPx9G953TgOg==; 5:tKFDf0Z7770PjZp7DwNGJyo9sbnK1orUahikUn6Ph8LDdCHTkUEHoGTyrEjge0LwSOHORQVjjMXjirIJj0/JooSubTYI+pf73oEcUip5ZBzUWT6nb9efcXdRYwOlBRktPOX+FtfZ8xebnSb6FHnzAj++Ko+HmV4uJCL1ecAlr6Q=; 7:1oXu5yyyJBC4aHQaRfBsX9O0WVE3hViIQw0xV8EDwbcNwN0BHviUa+uXPDIBvao/5yGxmKDVrxB2c2Z3dvDcIt3fV6PFg/0lXS5Oqjka3FrM40c/2KEYcWF1p+Zm2/UK6+DlPZe/hoHie99ERKCL4b384FhC2A/mC68zDWqJU5M6m/hVLPUx5sY11CNXJk5uHiKdSoBAZlLrt5BMcs9vAnzNw5LQ/pMOeLW9tOcagWYt5Q7ErY67ihZWfDPCVedQ
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: f46a8e90-ee2e-42bf-602b-08d6205115f7
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:HE1PR07MB3225;
x-ms-traffictypediagnostic: HE1PR07MB3225:
x-microsoft-antispam-prvs: <HE1PR07MB3225AA06096E4F6C3DA23B4C89110@HE1PR07MB3225.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(192374486261705);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(149051)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991041); SRVR:HE1PR07MB3225; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB3225;
x-forefront-prvs: 0803A0241F
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(376002)(396003)(346002)(366004)(39860400002)(189003)(199004)(6116002)(446003)(68736007)(8936002)(6916009)(81156014)(6486002)(81166006)(44832011)(2900100001)(486006)(305945005)(36756003)(5640700003)(71200400001)(6512007)(71190400001)(6436002)(83716004)(5250100002)(14444005)(256004)(229853002)(1730700003)(476003)(2501003)(2616005)(3846002)(82746002)(106356001)(102836004)(99286004)(105586002)(2351001)(26005)(6506007)(14454004)(316002)(478600001)(8676002)(86362001)(11346002)(97736004)(76176011)(5660300001)(53936002)(33656002)(58126008)(6346003)(2906002)(6246003)(7736002)(66066001)(186003)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3225; H:HE1PR07MB4169.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=john.mattsson@ericsson.com;
x-microsoft-antispam-message-info: ibtt+YR+FuBjuz92mT43k6KCYL1H2aisUAVBGP4xCvJD5JS+AgjjEf8DR+ZA/P0W8Qf/V9uAcMI45joecIikBjdZVdD6MHjp2MYUzvZCnITDKuBoHDAbgxKy3feqAATaeU3VDRQjPC+7iJ/zdTnBMX1HXZOD/OZ2oS/138+lYT/CZEmLS7AtALKOr4Cvzp121uzss2v3ewpwEYiAr2dPq7MZYfHtPmM3nr2SZ3gSOs2R+VYOkSw6sdDOQ3RT/ML+firSTzTZ38Dizesk1iRp5x41iwzeYMf4t5o3aGn/9Btr9mMa0zoghhKFbu/dCFi3emH3XYE0JJIdkISpkO3wbWi4xKsOYP3upDlpyGX0hI4=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <E27D18286EFD604ABF5B10212E6DFD2D@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: f46a8e90-ee2e-42bf-602b-08d6205115f7
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2018 06:03:15.0936 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3225
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42KZGbG9SFfl9tJog7+/TC32b3nB5sDosWTJ T6YAxigum5TUnMyy1CJ9uwSujPsfrjEV7FGoOPJ4OXMD4wX5LkYODgkBE4m3a8K6GLk4hASO MkqsnzqHBcL5xijRunkJE4SzhEmi/8hHZhCHRWACs8SXvy/YIDKTmSSW7XrA3sXICeQ8YJRo /2oIYrMJGEjM3dPABmKLCKhKnFo2nRXEFhawkliwfhZU3Fri26PjjBC2kcTyqw/ZQG5iAap/ N8ULJMwrYC/x4FI7E8R4e4nbvxeCjeEUcJBY9u0vWJxRQEzi+6k1YDazgLjErSfzwWwJAQGJ JXvOM0PYohIvH/8D6xUV0JeY/6CDFSKuKNG7aw9UvazEpfndjCB/SQjsY5c4eOIMC0RCV+LD 1KnMkPDylXiwQhOi5jijxKt1+6EGaUnsuLYUalm2xPpZr9khbGuJl+d2Q9XISazqfcgC0byf WeLxwl+sExiNZiE5fBbQDmYBTYn1u/Qhwh4Sk1YsZIOwFSWmdD9knwUOF0GJkzOfsCxgZF3F KFqcWpyUm25kpJdalJlcXJyfp5eXWrKJEZg4Dm75bbCD8eVzx0OMAhyMSjy8ubeWRguxJpYV V+YeYpTgYFYS4bV1BwrxpiRWVqUW5ccXleakFh9ilOZgURLntfDbHCUkkJ5YkpqdmlqQWgST ZeLglGpgVN5s3dxgLL2qkjs13psrwPB5+MKGW0siYjcrbvg85avedql9J7yzeu9xO15W+3hA aOkBiS0fGGxme3ib79XOXqwyWW8WU8O+s6tVt4YkZee+Xyn1Q2mn1r+Wtet3fNzUbL1Jfdf9 /RF7rLp8tzgpiyz1vSUbn92Upa/U5PtigW/9Sz6Tf+fTlViKMxINtZiLihMBwZtwOBgDAAA=
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/8rcVHGAc8qwcTM9P2nFo5Toxo-E>
Subject: Re: [IPsec] Comments on draft-ietf-ipsecme-implicit-iv-05
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: Sat, 22 Sep 2018 06:03:21 -0000

Hi,

I think the idea of introducing "implicit IV" also in IPsec is great and something that absolutely should be done. Some comments:

- The abstract/introduction/security consideration gives the idea that it defines implicit IV for ENCR_AES_CTR which is does not. I think AES-CTR could be removed from the document.

- I think the the terminology of IV, nonce etc. in this document is very confusing. At least RFC 4106 defines IV to be the 8 octet ESP IV, while nonce is used for the 12 octet AEAD nonce, aligning with RFC 5116. I think this document should also follow this convention. e.g. I think the sentences should talk about IV instead of nonce.

   "but all of the algorithms mentioned above take an 8-octet nonce."

   "Currently this nonce is sent in each ESP packet"

- "Nonce generation for these algorithms has not been explicitly defined. 
   It has been left to the implementation"

I do not understand how implementation specific nonce (or IV) generation could be interoperable between implementation? If I understand correctly, the only thing sent in the ESP packet is the sequence number.

- If we go to the trouble of designing new encryption algorithms for ESP, I think this document does too little and misses opportunities to with very little work also make the algorithms stronger cryptographically as was done with TLS 1.2 -> TLS 1.3. I stongly suggest to change the nonce generation to follow current best practices established by e.g. TLS 1.3. Suggestion (here examplified for AES-128 in GCM mode)

   1. The KEYMAT requested for each AES-GCM key is 28 octets.  The first
        16 octets are the 128-bit AES key, and the remaining 12 octets
        are used as the salt value in the nonce.

   2. The nonce format is changed to a format following Section 4.4 of draft-mcgrew-iv-gen [XX] where IV = implicit IV

                   0  1  2  3  4  5  6  7  8  9 10 11
                 +--+--+--+--+--+--+--+--+--+--+--+--+
                 |00|00|00|00|           IV          |---+
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |                salt               |->(+)
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                                                         |
                 +--+--+--+--+--+--+--+--+--+--+--+--+   |
                 |                nonce              |<--+
                 +--+--+--+--+--+--+--+--+--+--+--+--+

                      Figure: Nonce Format

   3. The salt is kept secret

    In [YY] it is shown that this can be understood as a key-length extension that essentially extends the 128-bit key of AES-GCM to a 224-bit key giving significatntly better multi-user security (and single-user security)

- A large secret salt is useful for IKEv2 as well, I think the algorithms should be defined for IKEv2 as but with IV = explicit IV.

Cheers,
John