[Rift] RIFT fingerprint coverage

Bruno Rijsman <brunorijsman@gmail.com> Sun, 21 July 2019 09:35 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 D05751200DB for <rift@ietfa.amsl.com>; Sun, 21 Jul 2019 02:35:07 -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 4RqBaZ-XZLAx for <rift@ietfa.amsl.com>; Sun, 21 Jul 2019 02:35:06 -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 C547B1200C1 for <rift@ietf.org>; Sun, 21 Jul 2019 02:35:05 -0700 (PDT)
Received: by mail-ed1-x52a.google.com with SMTP id k8so38077925eds.7 for <rift@ietf.org>; Sun, 21 Jul 2019 02:35:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:date:subject:cc:to:message-id; bh=JcuDtIjeG/W/1VuM/dd0RzuXrur4TAS6Ut/5uhicbvo=; b=g3iBagj6gvb2McijEsGzJexV+SVMeOUifKKKwo8Pj65rFbj2hu+zHGN8uQ8md+BEoh ASA91ITqsmbXZkaKBCQZrPoBNh1GtP2DBWz/RgPtcfP4fZC6KIuyLCCsC6DbDK24XaOi mnYnLar59I1FaeMIl+TfC53xglWe7dX1gmjBYAL0ny+DYvtApnyO6BHVHoyip0Cq1vc5 kpQkoaB9oPvsV6MmMctZ0U7XqqHiJQPgFFDTSCqNMbL9R6eI3HrgJzUZLCFeZGIq3E5n kEptZj0b121QOtZ4FZbrlUY0nw7zphjBS1nYkTGSSnr4sTjVv8ywWIHdo3zZl2upcPfn L4DQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:subject:cc:to:message-id; bh=JcuDtIjeG/W/1VuM/dd0RzuXrur4TAS6Ut/5uhicbvo=; b=DcDtmcjphidxF4g3mvmOnC2k0mn0bSxOGTq+IGXLoMNATF+tlghEbRC52sCWQGrvr9 jUTQ90c9WuJVctKQJyvkqjEtrJ2Jk3qi2oraJJTwSVNHESU6m496xsEynsFk25sXTcPa UBT6v4vNmkJP9LKL2WTUevqaE+hsg3kJ/9xoOJFu4V2LxdwNzy0ljUvbngNXNQVo/Fwb QU30BXGnr+vQ+m30fuKHGP03519KcdHMBJYsjrwbPRA6MTJysyT3Z8TVlXPV23EqrtRb GtU/secjq8Kln63+7tTTNtCwEQXD56zk0dA0t+wt8uFsSyCbjiABd89Yy37m4ZWy5N4b P1Ig==
X-Gm-Message-State: APjAAAWN0LeToslR/ZhbfiFm/qcXDx2xW3OlFZ36e2TehKv8RuCQ21Ju 5pELojoWf8v3qqga9tJSGh4=
X-Google-Smtp-Source: APXvYqxYnegXT5F9w0ppRaoosA4LFPn0Pe0BC9gtqKz1mOLwMWL0ynArGy5I2DN/G82WyMege3fTxA==
X-Received: by 2002:a50:9273:: with SMTP id j48mr55733003eda.285.1563701704215; Sun, 21 Jul 2019 02:35:04 -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 e21sm7184561eje.55.2019.07.21.02.35.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jul 2019 02:35:03 -0700 (PDT)
From: Bruno Rijsman <brunorijsman@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_75185DDC-3C64-4739-A126-3C1C6FDB466F"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Sun, 21 Jul 2019 11:35:01 +0200
Cc: rift@ietf.org
To: Tony Przygienda <tonysietf@gmail.com>
Message-Id: <CF366357-79EA-4395-9024-09A371795695@gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rift/41nax-Ka_T89X4wt_FfnjRw92MM>
Subject: [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 09:35:08 -0000

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  |
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | 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                               |
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      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