Re: [Rift] RIFT fingerprint coverage

Bruno Rijsman <brunorijsman@gmail.com> Sun, 21 July 2019 10:40 UTC

Return-Path: <brunorijsman@gmail.com>
X-Original-To: rift@ietfa.amsl.com
Delivered-To: rift@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 21408120071 for <rift@ietfa.amsl.com>; Sun, 21 Jul 2019 03:40:02 -0700 (PDT)
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=[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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 6_PnqK46k5qa for <rift@ietfa.amsl.com>; Sun, 21 Jul 2019 03:40:00 -0700 (PDT)
Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 82D7F12004A for <rift@ietf.org>; Sun, 21 Jul 2019 03:39:59 -0700 (PDT)
Received: by mail-ed1-x52a.google.com with SMTP id d4so38199658edr.13 for <rift@ietf.org>; Sun, 21 Jul 2019 03:39:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=XlSid/JR+T8uHOhKECMzzfJlGRpgrsTrZwHUAXWxipU=; b=L3ymwoPGt/XaIKBUv84au8omjd0+A5bqCeUo3kXnagMhd+BoqQrp9St3+8gNWg4ZsR bKk/U7jt85y4O1VYDUmgV8KeMcYIe+ruc6d5ovjrmUbZJtXOrjjouQgRyy7klymY/9Ht Rn+3MoyxI2iyEQU2WI+C/1cXZMuEjX2J0dT+1kALz5dmvzWDFp+ytKi16jwW2BP1Jkau bj4lJs13iOd/CAg0rXGjF5uVp7JR77ZoPvZhAiTIiyhWfdTR66Eq4ZEleYgguTEr4Evy fZie2AdBjRt0MQVs+8AcRZ87IMz+bueCw3FExZcvCjCawRUx0ZWUHc51G7aF0n2dYy+8 GUNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=XlSid/JR+T8uHOhKECMzzfJlGRpgrsTrZwHUAXWxipU=; b=IslHVU6WDaf+YrKsqMvPMKXtSwaeAVY1+9f0B/SUM0pJpmpOuEYDHYzEBr7Zl7oAS6 CULCjJ+HVj7wgHLNM74X+gE7/6Ab8ofrpkOw0u2dvVKWmLU8E1l0mVkyhWyHT3uGowza cvcWPIYm6s/aoErQP9ikGgXrLZt/Yo2HyRZAX66VoJ+iFvdIlbBvQwI+aIG9ok9BeZnE FLcadGP7RR84ddk8zQEtC0KSXb5vHcra9bKKKkm4GKWVNT9hjTatA3tLo/MoESt+Tigd KMi3rewiqtHp59cZb/HDMUwW42clp0IBR3EYtg+rKNVraeQxrhadC+1sOSwcps46v9H9 Dh3A==
X-Gm-Message-State: APjAAAUJedEZYV9r7pe71DPOrqPehBl0ZQFjeGmfJrPUB3EE5aZjgavS pM8/+h5Iy6pH2pMwLQgvYjsE++9q1JI=
X-Google-Smtp-Source: APXvYqy6LAM+XEl+ikLQS9aIXoaNMi4LdhB1VSxm2A54y8V7uJvJ/iBELHEjZ4DNU2vuj4KICYRpmw==
X-Received: by 2002:a17:906:7281:: with SMTP id b1mr49455703ejl.63.1563705598017; Sun, 21 Jul 2019 03:39:58 -0700 (PDT)
Received: from [192.168.178.122] (ip-213-127-48-174.ip.prioritytelecom.net. [213.127.48.174]) by smtp.gmail.com with ESMTPSA id g18sm7233689ejo.3.2019.07.21.03.39.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jul 2019 03:39:57 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_39A4AA1C-7307-4798-80D6-A541F3D5E9A4"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Bruno Rijsman <brunorijsman@gmail.com>
In-Reply-To: <CF366357-79EA-4395-9024-09A371795695@gmail.com>
Date: Sun, 21 Jul 2019 12:39:55 +0200
Cc: rift@ietf.org
Message-Id: <F165CA6D-3537-4310-8453-77B069F69414@gmail.com>
References: <CF366357-79EA-4395-9024-09A371795695@gmail.com>
To: Tony Przygienda <tonysietf@gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rift/wcjsF25alTbCv9HErGR5MhZVjyE>
Subject: Re: [Rift] RIFT fingerprint coverage
X-BeenThere: rift@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of Routing in Fat Trees <rift.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rift>, <mailto:rift-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rift/>
List-Post: <mailto:rift@ietf.org>
List-Help: <mailto:rift-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rift>, <mailto:rift-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 21 Jul 2019 10:40:02 -0000

Fixing one important mistake in bold red below:


> On Jul 21, 2019, at 11:35 AM, Bruno Rijsman <brunorijsman@gmail.com> wrote:
> 
> Hi Tony and others,
> 
> I just noticed that the RIFT fingerprints do not cover the key-id nor the fingerprint-length nor the major-version.
> 
> This means that if an adversary changes the key-id, fingerprint-length, or major-version, it will not be detected by the fingerprint.
> 
> I cannot think of an immediate attack vector (maybe force a weaker algorithm by changing the key-id), but "it feels wrong".
> 
> I wonder whether we should expand the coverage of fingerprints slightly, as shown below?
> 
> Note that AFAIK in OSPF (for example) the digest does cover the key-id and auth-data-len.
> 
> Suggested change:
> 
>        0                   1                   2                   3
>        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
> 
>       UDP Header:
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |           Source Port         |       RIFT destination port   |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |           UDP Length          |        UDP Checksum           |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
>       Outer Security Envelope Header:
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |           RIFT MAGIC          |         Packet Number         |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |    Reserved   |  RIFT Major   | Outer Key ID  |    Outer      |
>       |               |    Version    |               | Fingerprint   |
>       |               |               |               |    Length     |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       ~  Outer Security Fingerprint covers all content starting       ~
>       |  at the Reserved field in the Outer Security Envelope Header  |
>       |  but excluding this fingerprint                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       | Weak Nonce Local              | Weak Nonce Remote             |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |            Remaining TIE Lifetime (all 1s in case of LIE)     |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
>       TIE Origin Security Envelope Header:
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                               |  TIE Origin   |
>       |              TIE Origin Key ID                |  Fingerprint  |
>       |                                               |    Length     |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       ~  TIE Origin Security Fingerprint covers all content starting  ~
>       |  at the TIE Origin Key ID field but excluding this fingerprint|
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
>       Serialized RIFT Model Object
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |                                                               |
>       ~                Serialized RIFT Model Object                   ~
>       |                                                               |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> 
> PS 1: I know that the rift-magic and packet-nr fields are left out of the fingerprint coverege on purpose, so I left it that way.
> 
> PS 2: I also updated the names have a clearer distinction between the two fingerprints.
> 
> — Bruno