Re: [Cfrg] Trouble reproducing mulX_POLYVAL() test vector from RFC 8452 Appendix A

Adam Langley <agl@imperialviolet.org> Thu, 05 September 2019 21:07 UTC

Return-Path: <alangley@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2F9DF120B9F for <cfrg@ietfa.amsl.com>; Thu, 5 Sep 2019 14:07:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.4
X-Spam-Level:
X-Spam-Status: No, score=-1.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 1h8qXr8Bnt8e for <cfrg@ietfa.amsl.com>; Thu, 5 Sep 2019 14:07:57 -0700 (PDT)
Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (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 46D33120B68 for <cfrg@irtf.org>; Thu, 5 Sep 2019 14:07:57 -0700 (PDT)
Received: by mail-qk1-f195.google.com with SMTP id d26so3664425qkk.2 for <cfrg@irtf.org>; Thu, 05 Sep 2019 14:07:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DByLSgsSHY+LlBHEXWKZj2lwjCCK9n72Ck87myW3ZLI=; b=fWapeIo899BZP/pf4ORjm4Qd00+heSOl3BuVL9PZi59dLFo7zWhdOKgRLovih/wVVx VfxAV0N4e01BFHUp57EJfEPvfC1ith4Nt75tbMBI/QmvWqeYlVES8ZXr5YDDDfIKGIpv fOmxBtEZ4VItDiHNk60M44Mdnn8l9mJV/9hSJt758UfXFMHaunjwFA4GLrNcPJUAFGd5 gtZ/bz3CqRWXRtP50eBhew2RAcA+KVBmWY91WKhnweMcvrvF9I/QyP+izTZoFQOGuE+y Lx+eiZKy6AAFefbF521KGngugmnRgONK/HzIgC12SqbDCTeIQlx7wYOIho4l3iyAmAlE MhqA==
X-Gm-Message-State: APjAAAXjzRv0SKoVO5a0s3Rdh+uW/MM9xE/Gv8YOqyJ6cWy3xW8iXCv9 8S/LAXHC5epNTjFuzaebgXIbTUJZAfIi6zZTFXw=
X-Google-Smtp-Source: APXvYqy8axal+LWgBZhvUHpuwqxFD4NMmBuTyCeoR2NP06l78K+X/Y6Iq3mxH6+2PriGSUM5n/JaSQwfXf6KL8IfO0E=
X-Received: by 2002:a05:620a:103b:: with SMTP id a27mr4959043qkk.200.1567717676174; Thu, 05 Sep 2019 14:07:56 -0700 (PDT)
MIME-Version: 1.0
References: <CAHOTMVJZXiVTMLoFO9XG8Y2ft29ejK4qLm2QMAG5tJ8FL5oy3g@mail.gmail.com>
In-Reply-To: <CAHOTMVJZXiVTMLoFO9XG8Y2ft29ejK4qLm2QMAG5tJ8FL5oy3g@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
Date: Thu, 05 Sep 2019 14:07:44 -0700
Message-ID: <CAMfhd9VhYHozoAnHGNVntXxYHayehV3zeifpf1dU_+DiO7GTuA@mail.gmail.com>
To: Tony Arcieri <bascule@gmail.com>
Cc: CFRG <cfrg@irtf.org>
Content-Type: multipart/alternative; boundary="00000000000032555b0591d4b76c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/67j4-30iMC6XeKC9cuGQEF39I2Y>
Subject: Re: [Cfrg] Trouble reproducing mulX_POLYVAL() test vector from RFC 8452 Appendix A
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Sep 2019 21:08:05 -0000

On Thu, Sep 5, 2019 at 1:05 PM Tony Arcieri <bascule@gmail.com> wrote:

> I've been trying to implement mulX_POLYVAL() as described in RFC 8452
> Appendix A:
>
> https://tools.ietf.org/html/rfc8452#appendix-A
>
> It says:
>
> Given the 16-byte string 01000000000000000000000000000000, [...]
>
> mulX_POLYVAL of that string is 02000000000000000000000000000000.
>
> As a more general example, given 9c98c04df9387ded828175a92ba652d8, [...]
> mulX_POLYVAL of it is 3931819bf271fada0503eb52574ca5f2.
>
>
> However, I am getting 3931819bf271fada0503eb52574ca572 (highest bit
> unset). I'm not sure if it's a problem with my code, or the test vector.
>

Ah fuck, so do I. Indeed, even if I revert my test code back to the point
in time when I wrote that, I still get the same answer. I fear that it's a
transliteration error: I may have been editing the XML on a different
machine than the one that I had the code on and the '7' looked like an 'f'.

The IETF doesn't fix RFCs, but could you report an errata on it and then I
think I can mark it verified.


Cheers

AGL