9srv Manual Collection/plan9/dsa(8) | 9srv Manual Collection/plan9/dsa(8) |
---|
auth/asn12dsa [ -t tag ] [ file ]
auth/dsa2pub [ file ]
auth/dsa2ssh [ -c comment ] [ file ]
All the numbers are in hexadecimal. A DSA public key omits the attributes beginning with !. 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.
For example, a private key and corresponding public key might look like this (with [⋯] indicating elisions and \ marking line breaks for readability):
Note that the order of the attributes does not matter.
Dsagen prints a randomly generated DSA private key whose n has exactly nbits (default 1024) significant bits. If tag is specified, it is printed between key and proto=dsa; typically, tag is a sequence of attribute-value comments describing the key.
Asn12dsa reads an DSA private key stored as ASN.1 encoded in the binary Distinguished Encoding Rules (DER) and prints a Plan 9 DSA key, inserting tag exactly as dsagen does. ASN.1/DER is a popular key format on Unix and Windows; it is often encoded in text form using the Privacy Enhanced Mail (PEM) format in a section labeled as an ``DSA PRIVATE KEY.'' The command:
extracts the key section from a textual ASN.1/DER/PEM key into binary ASN.1/DER format and then converts it to a Plan 9 DSA key.
Dsa2pub reads a Plan 9 DSA public or private key, removes the private attributes, and prints the resulting public key. Comment attributes are preserved.
Dsa2ssh
reads a Plan 9 DSA public or private key and prints the public portion
in the format used by SSH:
ssh-dss
and a long base-64 encoded number.
delim @@
For compatibility with external SSH implementations, the public keys in
/sys/lib/ssh/keyring
and
$home/lib/keyring
are stored in this format.
9srv Manual Collection/plan9/dsa(8) | Rev: Tue Apr 03 20:25:45 BST 2012 |