chiark / gitweb /
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.