-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssh: types for legacy algorithm sets
- Loading branch information
Showing
1 changed file
with
67 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,64 +128,80 @@ | |
-type open_socket() :: gen_tcp:socket(). | ||
|
||
-type subsystem_spec() :: {Name::string(), mod_args()} . | ||
|
||
-type algs_list() :: list( alg_entry() ). | ||
-type alg_entry() :: {kex, [kex_alg()]} | ||
-type alg_entry() :: {kex, [kex_alg()]} | ||
| {public_key, [pubkey_alg()]} | ||
| {cipher, double_algs(cipher_alg())} | ||
| {mac, double_algs(mac_alg())} | ||
| {compression, double_algs(compression_alg())} . | ||
|
||
-type kex_alg() :: 'diffie-hellman-group-exchange-sha1' | | ||
'diffie-hellman-group-exchange-sha256' | | ||
'diffie-hellman-group1-sha1' | | ||
'diffie-hellman-group14-sha1' | | ||
'diffie-hellman-group14-sha256' | | ||
'diffie-hellman-group16-sha512' | | ||
'diffie-hellman-group18-sha512' | | ||
'curve25519-sha256' | | ||
'[email protected]' | | ||
'curve448-sha512' | | ||
'ecdh-sha2-nistp256' | | ||
'ecdh-sha2-nistp384' | | ||
'ecdh-sha2-nistp521' | ||
. | ||
|
||
-type pubkey_alg() :: 'ecdsa-sha2-nistp256' | | ||
'ecdsa-sha2-nistp384' | | ||
'ecdsa-sha2-nistp521' | | ||
'ssh-ed25519' | | ||
'ssh-ed448' | | ||
'rsa-sha2-256' | | ||
'rsa-sha2-512' | | ||
'ssh-dss' | | ||
'ssh-rsa' | ||
. | ||
|
||
-type cipher_alg() :: '3des-cbc' | | ||
'AEAD_AES_128_GCM' | | ||
'AEAD_AES_256_GCM' | | ||
'aes128-cbc' | | ||
'aes128-ctr' | | ||
'[email protected]' | | ||
'aes192-ctr' | | ||
'aes192-cbc' | | ||
'aes256-cbc' | | ||
'aes256-ctr' | | ||
'[email protected]' | | ||
'[email protected]' | ||
. | ||
-type kex_alg() :: | ||
'diffie-hellman-group-exchange-sha256' | | ||
'diffie-hellman-group14-sha256' | | ||
'diffie-hellman-group16-sha512' | | ||
'diffie-hellman-group18-sha512' | | ||
'curve25519-sha256' | | ||
'[email protected]' | | ||
'curve448-sha512' | | ||
'ecdh-sha2-nistp256' | | ||
'ecdh-sha2-nistp384' | | ||
'ecdh-sha2-nistp521' | | ||
legacy_kex_alg(). | ||
|
||
-type legacy_kex_alg() :: | ||
%% Gone in OpenSSH 7.3.p1 | ||
'diffie-hellman-group1-sha1' | | ||
%% Gone in OpenSSH 8.2 | ||
'diffie-hellman-group14-sha1' | | ||
'diffie-hellman-group-exchange-sha1'. | ||
|
||
-type pubkey_alg() :: | ||
'ecdsa-sha2-nistp256' | | ||
'ecdsa-sha2-nistp384' | | ||
'ecdsa-sha2-nistp521' | | ||
'ssh-ed25519' | | ||
'ssh-ed448' | | ||
'rsa-sha2-256' | | ||
'rsa-sha2-512'. | ||
|
||
-type legacy_pubkey_alg() :: | ||
'ssh-rsa' | | ||
%% Gone in OpenSSH 7.3.p1: | ||
'ssh-dss'. | ||
|
||
-type cipher_alg() :: | ||
'aes128-ctr' | | ||
'[email protected]' | | ||
'aes192-ctr' | | ||
'aes256-ctr' | | ||
'[email protected]' | | ||
'[email protected]' | | ||
legacy_cipher_alg() | ||
. | ||
|
||
-type mac_alg() :: 'AEAD_AES_128_GCM' | | ||
'AEAD_AES_256_GCM' | | ||
'hmac-sha1' | | ||
'[email protected]' | | ||
'hmac-sha1-96' | | ||
'hmac-sha2-256' | | ||
'hmac-sha2-512' | | ||
'[email protected]' | | ||
'[email protected]' | ||
. | ||
-type legacy_cipher_alg() :: | ||
'AEAD_AES_128_GCM' | | ||
'AEAD_AES_256_GCM' | | ||
%% Gone in OpenSSH 7.6 | ||
'aes128-cbc' | | ||
'aes192-cbc' | | ||
'aes256-cbc' | | ||
'3des-cbc'. | ||
|
||
-type mac_alg() :: | ||
'hmac-sha1' | | ||
'[email protected]' | | ||
'hmac-sha2-256' | | ||
'hmac-sha2-512' | | ||
'[email protected]' | | ||
'[email protected]' | | ||
legacy_mac_alg(). | ||
|
||
-type legacy_mac_alg() :: | ||
'AEAD_AES_128_GCM' | | ||
'AEAD_AES_256_GCM' | | ||
'hmac-sha1-96'. | ||
|
||
-type compression_alg() :: 'none' | | ||
'zlib' | | ||
|