Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Xdwpw-0003bZ-6y for bitcoin-development@lists.sourceforge.net; Tue, 14 Oct 2014 07:48:04 +0000 X-ACL-Warn: Received: from mail1.bemta3.messagelabs.com ([195.245.230.167]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1Xdwpu-0001jN-Dz for bitcoin-development@lists.sourceforge.net; Tue, 14 Oct 2014 07:48:04 +0000 Received: from [85.158.138.179:29644] by server-7.bemta-3.messagelabs.com id 0E/E1-01084-A60DC345; Tue, 14 Oct 2014 07:27:38 +0000 X-Env-Sender: thomas@thomaszander.se X-Msg-Ref: server-10.tower-169.messagelabs.com!1413271657!9388817!1 X-Originating-IP: [83.145.56.68] X-StarScan-Received: X-StarScan-Version: 6.12.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7230 invoked from network); 14 Oct 2014 07:27:38 -0000 Received: from unknown (HELO mail.infront.no) (83.145.56.68) by server-10.tower-169.messagelabs.com with AES128-SHA encrypted SMTP; 14 Oct 2014 07:27:38 -0000 Received: from SE8EX13-MBX01.osl.infront.as (10.234.180.15) by SE8TMG.osl.infront.as (10.234.180.35) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 14 Oct 2014 09:27:37 +0200 Received: from SE8EX13-CAS.osl.infront.as (10.234.180.10) by SE8EX13-MBX01.osl.infront.as (10.234.180.15) with Microsoft SMTP Server (TLS) id 15.0.775.38; Tue, 14 Oct 2014 09:27:36 +0200 Received: from debian.localnet (10.234.92.34) by SE8EX13-CAS.osl.infront.as (10.234.180.11) with Microsoft SMTP Server (TLS) id 15.0.775.38 via Frontend Transport; Tue, 14 Oct 2014 09:27:36 +0200 From: Thomas Zander To: Date: Tue, 14 Oct 2014 09:27:36 +0200 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-486; KDE/4.8.4; i686; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <201410140927.36252.thomas@thomaszander.se> X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Headers-End: 1Xdwpu-0001jN-Dz Subject: Re: [Bitcoin-development] Malleable booleans X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2014 07:48:04 -0000 On Tuesday 14. October 2014 04.34.16 Pieter Wuille wrote: > This means that scripts that use booleans as inputs will be inherently > malleable. I've ran into this issue in C++ often enough, a funny example is assigning "2" to a native c++ bool and then you can do a if (myBool == true) else if (myBool == false) and neither of them will hit. > I > would like to change BIP62 to also state that interpreted booleans > must be of minimal encoded size (in addition to numbers). What about rejecting a script where a bool is not explicitly zero or one? -- Thomas Zander