ui_puttygen » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2016-01-06 | 2016-01-21 | ||
commandline#keygen (martin) | 5.8.1 Support for ECDSA keys + Support for Ed25519 user and host keys + updating from putty doc (martin) | ||
Line 1: | Line 1: | ||
====== Using PuTTYgen ====== | ====== Using PuTTYgen ====== | ||
- | PuTTYgen is a key generator. It generates pairs of [[public_key|public and private keys]] to be used with WinSCP. PuTTYgen generates RSA and DSA keys. | + | PuTTYgen is a key generator. It generates pairs of [[public_key|public and private keys]] to be used with WinSCP. PuTTYgen generates RSA, DSA, ECDSA, and Ed25519 keys. |
===== Obtaining and Starting PuTTYgen ===== | ===== Obtaining and Starting PuTTYgen ===== | ||
Line 29: | Line 29: | ||
===== [[type]] Selecting the Type of Key ===== | ===== [[type]] Selecting the Type of Key ===== | ||
- | Before generating a key pair using PuTTYgen, you need to select which type of key you need. PuTTYgen currently supports three types of key: | + | Before generating a key pair using PuTTYgen, you need to select which type of key you need. PuTTYgen currently supports these types of key: |
- | * An RSA key for use with the SSH-1 protocol. | ||
* An RSA key for use with the SSH-2 protocol. | * An RSA key for use with the SSH-2 protocol. | ||
* A DSA key for use with the SSH-2 protocol. | * A DSA key for use with the SSH-2 protocol. | ||
+ | * An ECDSA (elliptic curve DSA) key for use with the SSH-2 protocol. | ||
+ | * An Ed25519 key (another elliptic curve algorithm) for use with the SSH-2 protocol. | ||
+ | * An RSA key for use with the SSH-1 protocol. | ||
- | The SSH-1 protocol only supports RSA keys; if you will be connecting using the SSH-1 protocol, you must select the first key type or your key will be completely useless. | + | The SSH-2 protocol supports more than one key type. The types supported by WinSCP are RSA, DSA, ECDSA, and Ed25519. |
- | + | ||
- | The SSH-2 protocol supports more than one key type. The two types supported by WinSCP are RSA and DSA. | + | |
The WinSCP developers strongly recommend you use RSA. DSA has an intrinsic weakness which makes it very easy to create a signature which contains enough information to give away the private key! This would allow an attacker to pretend to be you for any number of future sessions. WinSCP's implementation has taken very careful precautions to avoid this weakness, but we cannot be 100% certain we have managed it, and if you have the choice we strongly recommend using RSA keys instead. | The WinSCP developers strongly recommend you use RSA. DSA has an intrinsic weakness which makes it very easy to create a signature which contains enough information to give away the private key! This would allow an attacker to pretend to be you for any number of future sessions. WinSCP's implementation has taken very careful precautions to avoid this weakness, but we cannot be 100% certain we have managed it, and if you have the choice we strongly recommend using RSA keys instead. | ||
If you really need to connect to an SSH server which only supports DSA, then you probably have no choice but to use DSA. If you do use DSA, we recommend you do not use the same key to authenticate with more than one server. | If you really need to connect to an SSH server which only supports DSA, then you probably have no choice but to use DSA. If you do use DSA, we recommend you do not use the same key to authenticate with more than one server. | ||
+ | |||
+ | The SSH-1 protocol only supports RSA keys; if you will be connecting using the SSH-1 protocol, you must select the first key type or your key will be completely useless. | ||
===== [[size]] Selecting the Size (Strength) of the Key ===== | ===== [[size]] Selecting the Size (Strength) of the Key ===== | ||
Line 47: | Line 49: | ||
The //Number of bits// input box allows you to choose the strength of the key PuTTYgen will generate. | The //Number of bits// input box allows you to choose the strength of the key PuTTYgen will generate. | ||
- | Currently 2048 bits should be sufficient for most purposes. | + | For RSA, 2048 bits should currently be sufficient for most purposes. |
+ | |||
+ | For ECDSA, only 256, 384, and 521 bits are supported. (%%ECDSA%% offers equivalent security to %%RSA%% with smaller key sizes.) | ||
+ | |||
+ | For Ed25519, the only valid size is 256 bits. | ||
===== [[generate]] The Generate Button ===== | ===== [[generate]] The Generate Button ===== | ||
Line 61: | Line 67: | ||
===== [[fingerprint]] The Key Fingerprint Box ===== | ===== [[fingerprint]] The Key Fingerprint Box ===== | ||
- | The //Key fingerprint// box shows you a fingerprint value for the generated key. This is derived cryptographically from the public key value, so it doesn't need to be kept secret. | + | The //Key fingerprint// box shows you a fingerprint value for the generated key. This is derived cryptographically from the public key value, so it doesn't need to be kept secret; it is supposed to be more manageable for human beings than the public key itself. |
The fingerprint value is intended to be cryptographically secure, in the sense that it is computationally infeasible for someone to invent a second key with the same fingerprint, or to find a key with a particular fingerprint. | The fingerprint value is intended to be cryptographically secure, in the sense that it is computationally infeasible for someone to invent a second key with the same fingerprint, or to find a key with a particular fingerprint. | ||
Line 130: | Line 136: | ||
PuTTYgen can also export private keys in OpenSSH format and in ssh.com format. To do so, select one of the //Export// options from the //Conversions// menu. Exporting a key works exactly like [[#saving_private|saving it]] - you need to have typed your passphrase in beforehand, and you will be warned if you are about to save a key without a passphrase. | PuTTYgen can also export private keys in OpenSSH format and in ssh.com format. To do so, select one of the //Export// options from the //Conversions// menu. Exporting a key works exactly like [[#saving_private|saving it]] - you need to have typed your passphrase in beforehand, and you will be warned if you are about to save a key without a passphrase. | ||
+ | |||
+ | For OpenSSH there are two options. Modern OpenSSH actually has two formats it uses for storing private keys. //Export OpenSSH key// will automatically choose the oldest format supported for the key type, for maximum backward compatibility with older versions of OpenSSH; for newer key types like Ed25519, it will use the newer format as that is the only legal option. If you have some specific reason for wanting to use OpenSSH's newer format even for RSA, DSA, or ECDSA keys, you can choose //Export OpenSSH key (force new file format)//. | ||
Note that since only SSH-2 keys come in different formats; the export options are not available if you have generated an SSH-1 key. ((&puttydoccite)) | Note that since only SSH-2 keys come in different formats; the export options are not available if you have generated an SSH-1 key. ((&puttydoccite)) | ||
You can also use WinSCP ''[[commandline#keygen|/keygen]]'' command-line switch to convert the private key from other formats. | You can also use WinSCP ''[[commandline#keygen|/keygen]]'' command-line switch to convert the private key from other formats. |