forsyth20121205-174063a80cc13 years agoHistory
262 lines · 3.5 KB · Text
RawDownload
.TH AI2KEY 8.SH NAMEai2key, dsagen, rsagen \- generate and reformat public keys.SH SYNOPSIS.B ai2key[.BI -t " tag"].I keyfile\&....PP.B dsagen[.BI -t " tag"].PP.B rsagen[.BI -b " nbits"] [.BI -t " tag"].SH DESCRIPTION.IR Factotum (4)represents public keys as lists of attribute-value pairs, each key on a single line prefixed with the string.BR key ..PP.I Ai2keyconverts the original Inferno representation of authentication data,in the format defined for.B authinfoby.IR keytext (6),to an attribute-value format accepted by.IR factotum (4)for the.B infauthauthentication protocol.For each.I keyfileit writes a single line on standard output, containingthe following fields:.IP.EX.fi.ti -3nkey proto=infauth[.I tag].BI "sigalg=" pkalg - hashalg[.BI dom= host].BI server= host[.BI service= svc].BI "user=" name.BI "signer=" name.BI "pk=" pk.BI "!sk=" sk.BI spk= pk.BI cert= cert.BI dh-alpha= hex.BI dh-p= hex.EE.PPwhere.RS.TP 15n.I pkalgis.BR dsa ,.B elgamalor.BR rsa.PD 0.ns.TP.I hashalgis.B md5or.BR sha1.br.ns.TP.B useris the user name associated with the key, as vouched for by the supportingcertificate.BR cert.br.ns.TP.B signeris the user name associated with the key that signed the certificate.br.ns.TP.B pkis the user's public key.br.ns.TP.B !skis the user's private (secret) key.br.ns.TP.B spkis the signer's public key.br.ns.TP.B certis the.I certificate.br.ns.TP.BR dh-alpha ,\  dh-pare the Diffie-Hellman parameters shared by the user and file servers..RE.PD.PPThe key is tagged by one or more of.BR dom ,.B serverand.BR service ,derived from the file name.IR keyfile .The server is.RB ` * 'if.I keyfileis.BR default .Otherwise.I keyfilehas the form.IP[.IB net !].I host[.BI ! srv].PPand.B serverand.B serviceare set accordingly;.B domis set if.I hostlooks like a domain name.Key and certificate values have the form defined in.IR keytext (6);.I hexis a large number in hexadecimal..PP.I Dsagenprints a randomly-generated DSA private key using the NIST-recommended algorithm.If.I tagtext is specified, it is printed after the.B protoattribute-value pair.Typically,.I tagis a sequence of attribute-value comments describing the key.A DSA key has the following attributes.RS.TP 8n.B pprime public modulus.PD 0.TP.B qprime group order; divides.BR p -1.TP.B alphagroup generator.TP.B key.BR alpha ^ !secretmod.B p.TP.B !secretthe secret exponent.RE.PD.PP.I Rsagenprints a randomly generated RSA private keywhose.B nhas exactly.I nbits(default 1024)significant bits.The key has the following attributes:.RS.TP.B sizethe number of significant bits in.B n.PD 0.TP.B ekthe encryption exponent.TP.B nthe product of.B !pand.B !q.TP.B !dkthe decryption exponent.TP.B !pa large prime.TP.B !qanother large prime.TP.B "!kp\fR, \fL!kq\fR, \fL!c2parameters derived from the other attributes, cached to speed decryption.RE.PD.PPAll the numbers in.I dsagenand.I rsagenoutput are in hexadecimal except RSA's.BR size ,which is decimal.A public key omits the attributes beginning with.L ! .A key may have other attributes as well, for example a.B serviceattribute identifying how this key is typically used,but to these utilities such attributes are merely comments.They can be provided in a.I tagargument..SH SOURCE.B /appl/cmd/auth/ai2key.b.br.B /appl/cmd/auth/dsagen.b.br.B /appl/cmd/auth/rsagen.b.SH "SEE ALSO".IR factotum (4)