Re: [Bitcoin-development] Malleable booleans

2014-10-14 Thread Thomas Zander
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

Re: [Bitcoin-development] Malleable booleans

2014-10-14 Thread Gregory Maxwell
On Tue, Oct 14, 2014 at 7:27 AM, Thomas Zander tho...@thomaszander.se wrote: What about rejecting a script where a bool is not explicitly zero or one? I believe this is what he actually meant. -- Comprehensive Server

Re: [Bitcoin-development] Malleable booleans

2014-10-14 Thread Wladimir
On Tue, Oct 14, 2014 at 9:27 AM, Thomas Zander tho...@thomaszander.se wrote: 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

Re: [Bitcoin-development] Malleable booleans

2014-10-14 Thread Peter Todd
On Mon, Oct 13, 2014 at 07:34:16PM -0700, Pieter Wuille wrote: Hi all, while working on a BIP62 implementation I discovered yet another type of malleability: the interpretation of booleans. Any byte array with non-zero bytes in it (ignoring the highest bit of the last byte, which is the