Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 5F672BAD for ; Fri, 22 Sep 2017 22:07:36 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com [74.125.83.45]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E2F3042D for ; Fri, 22 Sep 2017 22:07:35 +0000 (UTC) Received: by mail-pg0-f45.google.com with SMTP id d8so1262906pgt.4 for ; Fri, 22 Sep 2017 15:07:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=friedenbach-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Dyfij+lcwEbq0mkXaXQi0tb4MWILyIPrrrOZE/hhmvw=; b=bY5+XrEIDNeYTeEMpdF6Bli5vspNi4R+rd55C14BmTwRMbQkbKk9eFGhkIX6dGoMG3 L/UFgCGSkJhZSy56/JA1MRgO545x7sih1z4X7kjP0f3eGyaMyQQxNRGJonwMoGF4NtgN 5bTiDfqgIwpk3ZCsaxnUm7C73vDzC+dXb3xuouydTN7WUdt26Q2/zIzJoMwDY1XgHwNC KZSrErUXv8qCLsxN2qSQV3JF3/xKKDiYG/meTOTGECbnVzpHpr5aKwuNJF3rdOcMyyha 0CqrHNxtqEcKCJpnh/vPseCeOeOzi8ESCopmFKBISqDf7Gy7m3E9t9WZidcBzNsERvQM 8t+Q== 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 :content-transfer-encoding:message-id:references:to; bh=Dyfij+lcwEbq0mkXaXQi0tb4MWILyIPrrrOZE/hhmvw=; b=goMo/mxCBJ1XhZwvUe5myNhTmy4+EsncE1UmVb5t74qq2RYEOxXy1bO/RwsugS95ga iGvEn+BiVuXeT1yziU+Xex0Qkk9EQkzEoOBXE8hA1x8yLIDF10YXLwku5sbO05U09Vac OUUxQnkYEttn/RyM75vRbXuRqQfHoM1KB4Bh7u5j0bIBzZEUKOrvXYpAGoogmoWE1oWt X3aUJ+XJzFfYoaaFo01kOvyJ5TU+cQYSAi0V+wmKVDeLVYCfUAUvaXct0PW3qBVvGgF0 3KZtChvcDayhXAg3IoFTXReDMiPF1rK5kgObTrCoB5wYIIm1jB5np7PMm1UZK2Uaz/ov 7a9g== X-Gm-Message-State: AHPjjUirZzL9h5EPCsVrIjO1/Bn9fWLlV5UKW00qUNkh3hjjvvXubRzA +ZQV2c/q4kDjz05CSZLC9I1RKQ== X-Google-Smtp-Source: AOwi7QDrxaoJiHsMZevP1aErPsA/DGshJ8gSC86pjUtKQqc4AisxWJKs3iARMdgKmrbW79IZQEoWEA== X-Received: by 10.101.74.207 with SMTP id c15mr442952pgu.259.1506118055523; Fri, 22 Sep 2017 15:07:35 -0700 (PDT) Received: from ?IPv6:2601:640:103:3033:edb5:fcc6:47a5:7449? ([2601:640:103:3033:edb5:fcc6:47a5:7449]) by smtp.gmail.com with ESMTPSA id n2sm874614pgq.30.2017.09.22.15.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 15:07:34 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) From: Mark Friedenbach In-Reply-To: Date: Fri, 22 Sep 2017 15:07:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <971464E1-5AB8-44FD-BAE8-897DC4C5D970@friedenbach.org> References: <5B6756D0-6BEF-4A01-BDB8-52C646916E29@friedenbach.org> <201709190309.08669.luke@dashjr.org> <3385CE20-C1BA-40DD-8FC3-8F53F3350717@friedenbach.org> <9FD4AF03-28A5-4B8A-9C12-CBCB1BC2E22C@friedenbach.org> To: Sergio Demian Lerner X-Mailer: Apple Mail (2.3273) X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Fri, 22 Sep 2017 22:08:14 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] cleanstack alt stack & softfork improvements (Was: Merkle branch verification & tail-call semantics for generalized MAST) X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2017 22:07:36 -0000 There is no harm in the value being a maximum off by a few bytes. > On Sep 22, 2017, at 2:54 PM, Sergio Demian Lerner = wrote: >=20 > If the variable size increase is only a few bytes, then three = possibilities arise: >=20 > - one should allow signatures to be zero padded (to reach the maximum = size) and abandon strict DER encoding >=20 > - one should allow spare witness stack elements (to pad the size to = match the maximum size) and remove the cleanstack rule. But this is = tricky because empty stack elements must be counted as 1 byte. >=20 > - signers must loop the generation of signatures until the signature = generated is of its maximum size.