dsagen [ -t " tag" ]
rsagen [ -b " nbits" ] [ -t " tag" ]
Ai2key converts the original Inferno representation of authentication data, in the format defined for authinfo by keytext (6), to an attribute-value format accepted by factotum (4) for the infauth authentication protocol. For each keyfile it writes a single line on standard output, containing the following fields:
.EX key proto=infauth [ tag ] "sigalg=" pkalg - hashalg [ dom= host ] server= host [ service= svc ] "user=" name "signer=" name "pk=" pk "!sk=" sk spk= pk cert= cert dh-alpha= hex dh-p= hexwhere
15n pkalg is dsa , elgamal or rsa
0 .ns
hashalg is md5 or sha1
.ns
user is the user name associated with the key, as vouched for by the supporting certificate cert
.ns
signer is the user name associated with the key that signed the certificate
.ns
pk is the user's public key
.ns
!sk is the user's private (secret) key
.ns
spk is the signer's public key
.ns
cert is the certificate
.ns
dh-alpha , dh-p are the Diffie-Hellman parameters shared by the user and file servers.
The key is tagged by one or more of dom , server and service , derived from the file name keyfile . The server is ` * ' if keyfile is default . Otherwise keyfile has the form
[ net ! ] host [ ! srv ]and server and service are set accordingly; dom is set if host looks like a domain name. Key and certificate values have the form defined in keytext (6); hex is a large number in hexadecimal.
Dsagen prints a randomly-generated DSA private key using the NIST-recommended algorithm. If tag text is specified, it is printed after the proto attribute-value pair. Typically, tag is a sequence of attribute-value comments describing the key. A DSA key has the following attributes
8n p prime public modulus
0
q prime group order; divides p -1
alpha group generator
key alpha ^ !secret mod p
!secret the secret exponent
Rsagen prints a randomly generated RSA private key whose n has exactly nbits (default 1024) significant bits. The key has the following attributes:
size the number of significant bits in n
0
ek the encryption exponent
n the product of !p and !q
!dk the decryption exponent
!p a large prime
!q another large prime
"!kp, \fL!kq, \fL!c2 parameters derived from the other attributes, cached to speed decryption
All the numbers in dsagen and rsagen output are in hexadecimal except RSA's size , which is decimal. A public key omits the attributes beginning with .L ! . A key may have other attributes as well, for example a service attribute identifying how this key is typically used, but to these utilities such attributes are merely comments. They can be provided in a tag argument.