ecdsasign: use HKDF-SHA256 to generate the value k

To avoid the need for good random during signature generation, use HKDF-SHA256
to generate the pseudorandom string k, using the secret key as the PRK value of
the expansion step and the message hash as info (the extraction step is skipped)

Instead of generating another random string by further iterating the HKDF
algorithm, we just cancel the signing operation when r or s is 0, as this
probably won't ever happen in this universe.