<<  >> (p.948)
    Author Topic: Gold collapsing. Bitcoin UP.  (Read 2032330 times)
    cypherdoc (OP)
    Legendary
    *
    Offline Offline

    Activity: 1764
    Merit: 1009



    View Profile
    December 23, 2014, 01:25:41 AM
     #18941

    The solution is for the community to demand that bitcoin hardware and software wallets use deterministic signatures, for example following RFC6979.  When RFC6979 is used, the k-value used for producing the ECDSA signature is derived deterministically from the message and the private key.  This has the benefit of

       (1) eliminating the need for a RNG when producing signatures (and thus the risk of using a flawed RNG)
       (2) making software/hardware audits much simpler (just load test private keys and make sure the signatures match what's expected [it's very difficult to audit a RNG, on the other hand])

    Adding deterministic signatures is not a significant software project either.  Basically, rather than calling a random number generator when selecting k:

       k = random256bits()
     
    we pass the private key and the message to an RFC6979 library function instead:

       k = rfc6979(privkey, message)

    This rest of the code remains unchanged.  

    Was not aware of RFC6979, thank you for sharing. Has any wallet software started to move in this direction or implemented this approach?

    It seems this will work well for an existing HD wallet, where no new private keys need to be generated. However most wallet software needs to be able to create new wallets and still require the ability to generate cryptographically random numbers in order to create new private keys or a new HD seed. So the problem of wallet software requiring true random numbers still exists.

    It could even be argued that RFC6979 might make wallet developers less aware on how to obtain true random numbers since RFC6979 "fixed" the problem, and as a result generate weak HD seeds. I remember for Armory there was a discussion last summer that resulted in more entropy being added to HD seed generation, I am sure most wallet software is not as paranoid and could still be weak here even with RFC6979. Weak HD seed generation is much more of an issue than moderately weak k value generation IMHO.

    BTW, Not sure if the need for RFC6979 in general is more of a statement on how hard it is to produce true random numbers, or if this is more of a statement on the state of software engineering today.

    it is certainly a trend.  Trezor has it implemented.
Page 947
Viewing Page: 948