3 dsagen, dsasign, dsaverify, dsapuballoc, dsapubfree, dsaprivalloc, dsaprivfree, dsasigalloc, dsasigfree, dsaprivtopub - digital signature algorithm
11 .B #include <libsec.h>
14 DSApriv* dsagen(DSApub *opub)
17 DSAsig* dsasign(DSApriv *k, mpint *m)
20 int dsaverify(DSApub *k, DSAsig *sig, mpint *m)
23 DSApub* dsapuballoc(void)
26 void dsapubfree(DSApub*)
29 DSApriv* dsaprivalloc(void)
32 void dsaprivfree(DSApriv*)
35 DSAsig* dsasigalloc(void)
38 void dsasigfree(DSAsig*)
41 DSApub* dsaprivtopub(DSApriv*)
44 DSA is the NIST approved digital signature algorithm. The owner of a key publishes
45 the public part of the key:
51 mpint *q; // group order, q divides p-1
52 mpint *alpha; // group generator
53 mpint *key; // alpha**secret mod p
57 This part can be used for verifying signatures (with
62 using his private key:
68 mpint *secret; // (decryption key)
72 Keys are generated using
80 a key is created using a new
92 are copied from the old key.
95 returns a newly allocated copy of the public key
96 corresponding to the private key.
104 are provided to manage key storage.
121 returns 0 if the signature is valid and \-1 if not.
127 are provided to manage signature storage.