public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Bug in key.cpp
@ 2014-05-06  2:42 Srintuar
  2014-05-06  3:12 ` odinn.cyberguerrilla
  0 siblings, 1 reply; 3+ messages in thread
From: Srintuar @ 2014-05-06  2:42 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

I think i see a bug:

line 273 of key.cpp

        if (rec<0 || rec>=3)
            return false;

Afaict, 3 is a perfectly valid value, meaning 25% of sig-> key recoveries
would fail erroneously...

[-- Attachment #2: Type: text/html, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bitcoin-development] Bug in key.cpp
  2014-05-06  2:42 [Bitcoin-development] Bug in key.cpp Srintuar
@ 2014-05-06  3:12 ` odinn.cyberguerrilla
  2014-05-06  8:25   ` Pieter Wuille
  0 siblings, 1 reply; 3+ messages in thread
From: odinn.cyberguerrilla @ 2014-05-06  3:12 UTC (permalink / raw)
  To: Srintuar; +Cc: bitcoin-development

You are right there is a bug in there.

But the value is not 25% I think.  Tinker some more. :-)

> I think i see a bug:
>
> line 273 of key.cpp
>
>         if (rec<0 || rec>=3)
>             return false;
>
> Afaict, 3 is a perfectly valid value, meaning 25% of sig-> key recoveries
> would fail erroneously...
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find
> out:
> &#149; 3 signs your SCM is hindering your productivity
> &#149; Requirements for releasing software faster
> &#149; Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce_______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists•sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bitcoin-development] Bug in key.cpp
  2014-05-06  3:12 ` odinn.cyberguerrilla
@ 2014-05-06  8:25   ` Pieter Wuille
  0 siblings, 0 replies; 3+ messages in thread
From: Pieter Wuille @ 2014-05-06  8:25 UTC (permalink / raw)
  To: odinn.cyberguerrilla; +Cc: Bitcoin Dev

On Tue, May 6, 2014 at 5:12 AM,  <odinn.cyberguerrilla@riseup•net> wrote:
> You are right there is a bug in there.
>
> But the value is not 25% I think.  Tinker some more. :-)
>
>>
>> Afaict, 3 is a perfectly valid value, meaning 25% of sig-> key recoveries
>> would fail erroneously...

Values 2 and 3 are only needed in theory. They together shouldn't
occur more than once in 2**127 (when the signature value is between
the group size and the field size).

That said, this is indeed a bug.

-- 
Pieter



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-06  8:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06  2:42 [Bitcoin-development] Bug in key.cpp Srintuar
2014-05-06  3:12 ` odinn.cyberguerrilla
2014-05-06  8:25   ` Pieter Wuille

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox