9srv Manual Collection/plan9/dsa(2) | 9srv Manual Collection/plan9/dsa(2) |
---|
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*)
This part can be used for verifying signatures (with dsaverify) created by the owner. The owner signs (with dsasign) using his private key:
Keys are generated using dsagen. If dsagen's argument opub is nil, a key is created using a new p and q generated by DSAprimes (see prime(2)). Otherwise, p and q are copied from the old key.
Dsaprivtopub returns a newly allocated copy of the public key corresponding to the private key.
The routines dsapuballoc, dsapubfree, dsaprivalloc, and dsaprivfree are provided to manage key storage.
Dsasign signs message m using a private key k yielding a
Dsaverify returns 0 if the signature is valid and -1 if not.
The routines dsasigalloc and dsasigfree are provided to manage signature storage.
9srv Manual Collection/plan9/dsa(2) | Rev: Tue Apr 03 20:17:42 BST 2012 |