diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/keyring-gensk | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'man/2/keyring-gensk')
| -rw-r--r-- | man/2/keyring-gensk | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/man/2/keyring-gensk b/man/2/keyring-gensk new file mode 100644 index 00000000..a4c7fd65 --- /dev/null +++ b/man/2/keyring-gensk @@ -0,0 +1,49 @@ +.TH KEYRING-GENSK 2 +.SH NAME +keyring: genSK, genSKfromPK, sktopk, dhparams \- generate keys +.SH SYNOPSIS +.EX +include "keyring.m"; +keyring := load Keyring Keyring->PATH; +genSK: fn(algname, owner: string, length: int): ref SK; +genSKfromPK: fn(pk: ref PK, owner: string): ref SK; +sktopk: fn(sk: ref SK): ref PK; +dhparams: fn(nbits: int): (ref IPint, ref IPint); +.EE +.SH DESCRIPTION +.B GenSK +generates a public/private key pair, represented by +.BR SK . +(Although we call it a `private key', +.B SK +contains both the private and public parts of a public key.) +.I Algname +is the name of the algorithm to use; in the current implementation, only +.B elgamal +and +.B rsa +are possible. +.I Owner +is the user name to be associated with the key. +.I Length +gives the length of the key modulus in bits. +.B GenSK +returns nil if an unknown algorithm has been specified. +.PP +.B GenSKfromPK +generates a private key that has the same system parameters as the public key +.IR pk . +It is used to generate new keys that are of the same complexity as old keys. +.PP +.B Sktopk +extracts the public part of private key. +.PP +.B Dhparams +creates Diffie-Hellman parameters. The second +.B IPint +returned is an +.I nbits +long prime number that serves as the modulus. +The first +.B IPint +is a primitive root in the integer field defined by that modulus. |
