1

I generated varios(DSA, RSA, ECDSA, etc) SSH keys with ssh-keygen and with latest version of PuTTY Key Generator and both utilities suffix the public key with a same string. I mean, for example, both suffix RSA key with ssh-rsa, ED25519 key with ssh-ed25519 or RSA-1 key with a key length(for example 2048). Does this suffix format come from some standard? Are those same suffixes used by all utilities which generate an SSH key-pairs?

1

Nit: these names come before the blob and thus are prefixes not suffixes.

This standard for the publickey file format is set by OpenSSH, which also also uses it in the known_hosts and authorized_keys files with some more (also prefix!) fields added. See man sshd on Unix with OpenSSH installed or the latest version on the web under "AUTHORIZED_KEYS FILE FORMAT" and "SSH_KNOWN_HOSTS FILE FORMAT". All version 2 keys use a string for keytype and a base64-encoded blob of the publickey as transmitted during SSH(v2) key-exchange, which is defined by several RFCs.

The online manpage no longer includes version 1 keys, although AFAICT all releases to date (through 7.3) still support version 1 BUT strongly discourage its use because it is long obsolete and broken. Version 1 used three decimal numbers: nbits, exponent (small), and modulus (large).

PuTTYgen proactively displays the OpenSSH format, but the SavePublicKey button (or File menu item) writes the different though related format defined by rfc4716 which is also used by OpenSSH ssh-keygen -e/-i. I understand the 'commercial' SSH implementation (fka Tectia) uses this format can't confirm personally.

Keytypes for 'plain' keys are generally defined by the SSHv2 RFCs, linked by an IANA registry. OpenSSH also supports its own form of certificates using keytypes in the vendor-defined format something@openssh.com which aren't registered. Finally, OpenSSH uses the standard-form name ssh-ed25519 even though AFAICT this is still in draft and not yet an RFC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.