Re: [Rift] RIFT fingerprint coverage

Bruno Rijsman <> Sun, 21 July 2019 15:52 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id F02371201AA for <>; Sun, 21 Jul 2019 08:52:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.998
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4ESN0K9Ae1ih for <>; Sun, 21 Jul 2019 08:52:18 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BAA61120157 for <>; Sun, 21 Jul 2019 08:52:17 -0700 (PDT)
Received: by with SMTP id w13so38554181eds.4 for <>; Sun, 21 Jul 2019 08:52:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=SKPhCwH1FVm2j25iDYUcBl81bs3yvEvI64IVDI9cG6c=; b=FLo+a1JErLizqYMHIN/DtT3Xq80EOafwLyheQn4xI52bSM8OiEQ3yWvxzvqag78Da+ cCJUZ3XUNPXCabWuKnX468HfPHe5WESTkCuLfynhQLAyP5o+gvqM3qtYoMC5z1tG6gjJ xKBJkLVF78RHsX0hubWjNz/hxBzMSFINJEEckxUYVx0QroDrz9ACxqtUa12d2iyl7x8G yBIRXIn3WV/dvkqjJv9tQrpGIuysPKQNzu5Yta4ROjCY4nQsxJcTd275HeSqT0UbcoMQ wq5ftzsSK4eAaPIo5f4aUBK5VLdbMi3b17bvbs1VBRwoEmlmUdy+cSi3tSUmCKpOYDJ0 hAzA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=SKPhCwH1FVm2j25iDYUcBl81bs3yvEvI64IVDI9cG6c=; b=gD+LYdXGwWEHsvZKZgu+WKHvmFiyuwn8kIga3TzbocCmCwRr8XwkyfRXc2sEjJedsM 50HKEZGo5M5EyQOHL0psnT8WUaFcm1tuuU1lMarIM46sj0SXjCJbJ+GFzbqJDDNlPgzA a/lGd9PYWmijM390vbq9Tzs5JpZiStpJnqBqbou0/lkfVc76StQk7G+wnVvos23UobTo Xv+bv/xTanAU3ax+1WOLB/dwwN10M1FelwRRTVKLIojCaK01DN8Xct0v4R7+jZLsVPK3 yuSSgI7gZFNaThyW3dBWmABq+27IO+KbwFNHEgYjgnes9fk4uj+NBPMen9JzXD6TM6R0 JqHw==
X-Gm-Message-State: APjAAAVaKOwrsKO6lvi7ahSQ42bGUoqIpS1xND3C91LSYPTH+0O8Bc6l nY39L0qRQQJDA+ban9tVEqpk+qMBmbU=
X-Google-Smtp-Source: APXvYqwg/bFDIfWmd0GhLWInswU3p48GX+FjmrF0kqsAjfep3dJo3EeW96P5L2kbyX2Aiq3/Rg7/0g==
X-Received: by 2002:a17:906:2b47:: with SMTP id b7mr49283006ejg.117.1563724336236; Sun, 21 Jul 2019 08:52:16 -0700 (PDT)
Received: from [] ( []) by with ESMTPSA id o21sm9970711edt.26.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jul 2019 08:52:15 -0700 (PDT)
From: Bruno Rijsman <>
Message-Id: <>
Content-Type: multipart/alternative; boundary="Apple-Mail=_4E77DA6A-6469-473A-989B-8EA838F2E3BE"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Sun, 21 Jul 2019 17:52:13 +0200
In-Reply-To: <>
Cc: Tony Przygienda <>, "" <>
To: Antoni Przygienda <>
References: <> <> <>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <>
Subject: Re: [Rift] RIFT fingerprint coverage
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion of Routing in Fat Trees <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 21 Jul 2019 15:52:23 -0000

> On Jul 21, 2019, at 4:22 PM, Antoni Przygienda <> wrote:

> 2. first, you can't extend the protection the way you like unless we have a complicated procedure where you protec with fingerprint 0, then you write fingerprint and on the other side you ahve to 0 out the fingerprint to check and so on. I wrote such code over protocols and it's very fragile. 

I think we should focus on whether it is a security issue or not (which was #3 of your response) rather than whether the implementation is difficult or not.

That said, the implementation is actually quite trivial and not fragile. 

Every signing library that I ever worked with has an update method that allows you to incrementally compute a digest.

Python provides hmac.update() and hashlib.update(). Rust provides hmac.input().

Python example:

import hmac
packet = b'Just imagine for a second that this is a protocol packet.'
signer ='top-secret', digestmod='sha256')
signer.update(packet[5:10])  # Digest over bytes 5-10
signer.update(packet[15:20]) # and also bytes 15-20
signer.update(packet[25:30]) # and also bytes 25-30

You can use this feature to make re-computing the outer fingerprint for TIEs that are stored in the TIE database much cheaper, knowing that you have already computed (and saved the signer for) the inner fingerprint.