chiark / gitweb /
pub/dsa.h, pub/dsa-sign.h: Deprecate the old DSA interface.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 27 May 2015 18:06:22 +0000 (19:06 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 23 Jun 2016 14:46:28 +0000 (15:46 +0100)
commit923814104a954492743ae36c2cbd4e3784b05839
tree1cde6a82414716a071d232a876ce0b22ecbcd53e
parentaa00f6fb75e7f8675c728e2cc8a6d1f3c538f25e
pub/dsa.h, pub/dsa-sign.h: Deprecate the old DSA interface.

It's terribly crufty and hard to use properly, because it offloads most
of the hard work onto its caller.  It's also next to impossible to fix.

The main problem is the handling of the nonce, which the caller is
expected to have come up with somehow and passed in.  It would be nice
to make this optional, and come up with a deterministic (or randomized-
but-safe) nonce in the default case, but that's very hard to do with
this interface:

  * The function isn't given a random number generator so it can't use
    that to randomize its nonce, if it wanted to do that.

  * Worse, we aren't given a hash function, so we don't know which one
    to use for generating the nonce.

It'd be possible to write a complicated thing which picks a hash
function out of a list somehow based on the other parameters, but it
doesn't seem worthwhile when taking advantage of this will still require
source changes to callers, and the newer `gdsa' interface is much
less awful.

So I'll just deprecate these old functions and hope that nobody uses
them for anything.
pub/dsa-sign.c
pub/dsa.h