Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more encryption algorithms #68

Closed
zero-github opened this issue Jul 17, 2023 · 3 comments
Closed

add more encryption algorithms #68

zero-github opened this issue Jul 17, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@zero-github
Copy link

my ssh server only support the below encryption algorithms, but the library do not support,
could you please add these implementation or give me an example for one of them.
["aes128-cbc", "3des-cbc", "aes192-cbc", "aes256-cbc"]

@HsuJv
Copy link
Collaborator

HsuJv commented Sep 10, 2023

Will do this ASAP.
BRs.

@HsuJv HsuJv added the enhancement New feature or request label Sep 16, 2023
@HsuJv HsuJv self-assigned this Sep 16, 2023
@HsuJv
Copy link
Collaborator

HsuJv commented Sep 16, 2023

Hi there,

Pr #73 has already implemented the four algorithms. Please switch to v0.4 to enable 'em,

Note that there are some breaking APIs as the version number is grown up.

BRs

@HsuJv
Copy link
Collaborator

HsuJv commented Sep 16, 2023

Usage:

ssh-rs/tests/algorithms.rs

Lines 149 to 217 in fc7a520

#[cfg(feature = "deprecated-aes-cbc")]
#[test]
fn test_aes128_cbc() {
let session = ssh::create_session_without_default()
.username(&get_username())
.private_key_path(get_pem_rsa())
.add_kex_algorithms(algorithm::Kex::DiffieHellmanGroup14Sha256)
.add_pubkey_algorithms(algorithm::PubKey::RsaSha2_256)
.add_enc_algorithms(algorithm::Enc::Aes128Cbc)
.add_compress_algorithms(algorithm::Compress::None)
.add_mac_algortihms(algorithm::Mac::HmacSha1)
.connect(get_server())
.unwrap()
.run_local();
session.close();
}
#[cfg(feature = "deprecated-aes-cbc")]
#[test]
fn test_aes192_cbc() {
let session = ssh::create_session_without_default()
.username(&get_username())
.private_key_path(get_pem_rsa())
.add_kex_algorithms(algorithm::Kex::DiffieHellmanGroup14Sha256)
.add_pubkey_algorithms(algorithm::PubKey::RsaSha2_256)
.add_enc_algorithms(algorithm::Enc::Aes192Cbc)
.add_compress_algorithms(algorithm::Compress::None)
.add_mac_algortihms(algorithm::Mac::HmacSha1)
.connect(get_server())
.unwrap()
.run_local();
session.close();
}
#[cfg(feature = "deprecated-aes-cbc")]
#[test]
fn test_aes256_cbc() {
let session = ssh::create_session_without_default()
.username(&get_username())
.private_key_path(get_pem_rsa())
.add_kex_algorithms(algorithm::Kex::DiffieHellmanGroup14Sha256)
.add_pubkey_algorithms(algorithm::PubKey::RsaSha2_256)
.add_enc_algorithms(algorithm::Enc::Aes256Cbc)
.add_compress_algorithms(algorithm::Compress::None)
.add_mac_algortihms(algorithm::Mac::HmacSha1)
.connect(get_server())
.unwrap()
.run_local();
session.close();
}
#[cfg(feature = "deprecated-des-cbc")]
#[test]
fn test_3des_cbc() {
let session = ssh::create_session_without_default()
.username(&get_username())
.private_key_path(get_pem_rsa())
.add_kex_algorithms(algorithm::Kex::DiffieHellmanGroup14Sha256)
.add_pubkey_algorithms(algorithm::PubKey::RsaSha2_256)
.add_enc_algorithms(algorithm::Enc::TripleDesCbc)
.add_compress_algorithms(algorithm::Compress::None)
.add_mac_algortihms(algorithm::Mac::HmacSha1)
.connect(get_server())
.unwrap()
.run_local();
session.close();
}

@HsuJv HsuJv closed this as completed Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants