DSA(2)DSA(2)
NAME
dsagen, dsasign, dsaverify, dsapuballoc, dsapubfree, dsaprivalloc, dsaprivfree, dsasigalloc, dsasigfree, dsaprivtopub - digital signature algorithm
SYNOPSIS
DSApriv* dsagen(DSApub *opub)
DSAsig* dsasign(DSApriv *k, mpint *m)
int dsaverify(DSApub *k, DSAsig *sig, mpint *m)
DSApub* dsapuballoc(void)
void dsapubfree(DSApub*)
DSApriv* dsaprivalloc(void)
void dsaprivfree(DSApriv*)
DSAsig* dsasigalloc(void)
void dsasigfree(DSAsig*)
DSApub* dsaprivtopub(DSApriv*)
DESCRIPTION
DSA is the NIST approved digital signature algorithm. The owner of a key publishes the public part of the key:
struct DSApub { mpint *p; // modulus mpint *q; // group order, q divides p-1 mpint *alpha; // group generator mpint *key; // alpha**secret mod p };
This part can be used for verifying signatures (with
struct DSApriv { DSApub pub; mpint *secret; // (decryption key) };
Keys are generated using
The routines
struct DSAsig { mpint *r, *s; };
The routines