Re: [irtf-discuss] [115attendees] Usable formal methods side meeting at IETF 115

Jonathan Hoyland <jonathan.hoyland@gmail.com> Tue, 08 November 2022 16:15 UTC

Return-Path: <jonathan.hoyland@gmail.com>
X-Original-To: irtf-discuss@ietfa.amsl.com
Delivered-To: irtf-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B04B4C152577 for <irtf-discuss@ietfa.amsl.com>; Tue, 8 Nov 2022 08:15:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.605
X-Spam-Level:
X-Spam-Status: No, score=-1.605 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, GB_ABOUTYOU=0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 59JMVrRC3wZj for <irtf-discuss@ietfa.amsl.com>; Tue, 8 Nov 2022 08:15:52 -0800 (PST)
Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9468CC1524D6 for <irtf-discuss@irtf.org>; Tue, 8 Nov 2022 08:15:52 -0800 (PST)
Received: by mail-pl1-x630.google.com with SMTP id p12so9107811plq.4 for <irtf-discuss@irtf.org>; Tue, 08 Nov 2022 08:15:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uk1RbEmh3MEXno394K266pLPYpxvpX2PnEMOFWYdmRk=; b=ZLg9aFts5xjILvlcT5xLhT1P5QTqPRTRX5MvZStYu2IYWhfP4ySU2hn/56BqMDWZCj eRjRw98/XTI8YoS8h7K1xz9o3eO4BEvcltxjyogH7egX6oGakQuIuCyUbPQoq/qKvzHm 0CHu448In5qIUjC3Od5TJFghVW7782J9naO6/J6cMsmlIPWslhrsZZF+7w2GSddR/ZLa SjGQzH942r4JYsxLwsyHMdHcrEVerrt4woih9JZX+2HYwaKc/00+lCOVjigbUKW6G7YQ P6S2DC7T86ErzcFFhKmurclbN63dUvnCvvrZn1+WIfwmVZ7ogWyQ+3MKABYSaGxti4iu L5yw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uk1RbEmh3MEXno394K266pLPYpxvpX2PnEMOFWYdmRk=; b=VTBfn87QdLGsJGYs3rkujfUUBO+637CMRTRIf06VSghZ/q+wanvSC2JrOVqH2L7Sch dHrv3K4Jx6skLzQ7lMIaq1C+o6ZEW6D4vw64MD1em1Ff/4SLeywsPL779athgMojyEf1 P4OtUKsWAGL4oPEVcRcM3m/bNykIdAMn4JK90TxzDm89G37fr4PRST1H/ve18D+tzDq2 /EUXYlmFsfzz/y4hnyHEQ01HHLE9IcAeMlxH2u2BesG6Bb8UsP6HGRX+TmtiAiyn9aGm tlaKGAxNzNQND5pVj+q45VPDNmpvtfitW3okCm/0DMwH5Maco6nhHjoWcN+m5pg6Lrd8 cMbw==
X-Gm-Message-State: ACrzQf2yzBpYciXr8ks7OzBSqjPkmocT3e24sFX/E32V2XV5L/TE5Lux f8Yfcs+aGWYeDBTFYuFRAgcG0YevRAB5HTCq0mw=
X-Google-Smtp-Source: AMsMyM5ybOuB5sncrjNCrU5gomAoMq0dgpBNWEa5kdO49HkqJ8rDJQpBoqvCxPpi0pjez1Wivetr2H7nQuvkceKJ7oA=
X-Received: by 2002:a17:902:e352:b0:187:c4c:26ff with SMTP id p18-20020a170902e35200b001870c4c26ffmr53642442plc.162.1667924151557; Tue, 08 Nov 2022 08:15:51 -0800 (PST)
MIME-Version: 1.0
References: <C91D3863-37D3-4E09-B1F9-588C316240CD@csperkins.org> <281e560d-0b89-53a5-de75-bfe68004917c@uni-mate.hu> <f03ea379-b15f-81b-76fa-f893a57f527@lakka.kapsi.fi> <439e42fe-0070-bcd8-602d-33f750224a44@uni-mate.hu>
In-Reply-To: <439e42fe-0070-bcd8-602d-33f750224a44@uni-mate.hu>
From: Jonathan Hoyland <jonathan.hoyland@gmail.com>
Date: Tue, 08 Nov 2022 16:15:39 +0000
Message-ID: <CACykbs3VQ6SYwzXxG50TheX2qEwsGGZCyDs8CgqiPFyPCNYeQA@mail.gmail.com>
To: Buday Gergely <buday.gergely.istvan=40uni-mate.hu@dmarc.ietf.org>
Cc: Sampo Syreeni <decoy@iki.fi>, Colin Perkins <csp@csperkins.org>, irtf-discuss@irtf.org, 115attendees@ietf.org
Content-Type: multipart/alternative; boundary="00000000000090e32705ecf7da70"
Archived-At: <https://mailarchive.ietf.org/arch/msg/irtf-discuss/dPvFM-oQ_d8g9js6NhmhXcL6Ubw>
Subject: Re: [irtf-discuss] [115attendees] Usable formal methods side meeting at IETF 115
X-BeenThere: irtf-discuss@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IRTF general and new-work discussion list <irtf-discuss.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/irtf-discuss>, <mailto:irtf-discuss-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/irtf-discuss/>
List-Post: <mailto:irtf-discuss@irtf.org>
List-Help: <mailto:irtf-discuss-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/irtf-discuss>, <mailto:irtf-discuss-request@irtf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Nov 2022 16:15:56 -0000

Hi All,

These are problems that have been discussed and worked on at length in both
academia and in the Security Area at the IETF.

You can break formal methods into two broad fields, formal analysis and
formal verification.

Formal analysis lets us look at a protocol design and check it has some
property we want.
A common method for formally analysing protocols is to express them in some
kind of rewriting system, and then check that the system has some LTL
property.
For example Tamarin <https://tamarin-prover.github.io/> is a software tool
that uses multi-set rewriting to express protocols, and a fragment of first
order logic to analyse them.
It was used to analyse, for example, *TLS 1.3*
<https://github.com/tls13tamarin/TLS13Tamarin>, and find mistakes in some
of the drafts <https://ieeexplore.ieee.org/abstract/document/7546518>.

Formal verification looks at code and checks that it implements some spec.
One technique for formally verifying protocols is to write the code in some
restricted programming language, and then use tools to check that that code
has some property.
For example you can use EasyCrypt <https://github.com/EasyCrypt/easycrypt/>
and Jasmin <https://github.com/jasmin-lang/jasmin/wiki> to write low-level
crypto code, and verify its security properties, including checking for
things like side channel safety.
Alternatively you can use F# with F7
<https://www.microsoft.com/en-us/research/project/f7-refinement-types-for-f/>
to analyse code.
There are formally verified implementations of things from ChaChaPoly
<https://github.com/EasyCrypt/easycrypt/tree/main/examples/ChaChaPoly> to TLS
1.3 <https://mitls.org/>.
Formally verified code is deployed in projects such as Chrome
<https://boringssl.googlesource.com/boringssl/+/refs/heads/master/third_party/fiat/>
and Firefox
<https://blog.mozilla.org/security/2020/07/06/performance-improvements-via-formally-verified-cryptography-in-firefox/>
.

The idea of generating prose from a specification is interesting, but not
something I have seen any work on so far.

Regards,

Jonathan

On Tue, 8 Nov 2022 at 07:18, Buday Gergely <buday.gergely.istvan=
40uni-mate.hu@dmarc.ietf.org> wrote:

> Hi Sampo,
>
> you wrote:
>
> 11/7/2022 10:06 PM keltezéssel, Sampo Syreeni írta:
> > I think English should augment formal specifications as it could
> > ignite debate whether the formalisation is correct and unambigous.
> >
> > Here I'd go more with the literal programming idea, and coloring your
> > statements with comments. Because if you really formalized your
> > protocol fully, so that the formal description really is whole and
> > binding, there is no need for debate. It just is or isn't valid.
>
> Formal verification can check whether a system conforms a specification.
> But there's always a question whether the specification conforms reality.
>
> You can prove theorems about your definitions with a theorem prover, but
> are your definitions right? This is another type of code review that
> protocol experts should do.
>
> >
> > As such English (why not other languages) simply serve to explain to a
> > human, what the intended semantics of the protocol and its data
> > formats are meant to be.
>
> Formal logic does not stand in itself, there are always thoughts about
> the protocol, system etc. that should be expressed in plain English to
> ease understanding. At all, for many formal methods practitioners, the
> main goal of formal verification is to better understand our designs,
> let the computer do the "trivial" stuff.
>
> - Gergely
>
> --
> 115attendees mailing list
> 115attendees@ietf.org
> https://www.ietf.org/mailman/listinfo/115attendees
>