8
$\begingroup$

How does TLS differ from SSH from a strictly cryptographic perspective?

I know that there are many non-cryptographic differences between them, but I would like to know the cryptographic ones.

$\endgroup$
3
  • 2
    $\begingroup$ cipher support. TLS supports a myriad of ciphers, SSH doesn't (but SSH does support Ed25519) $\endgroup$
    – SEJPM
    Mar 1, 2016 at 17:31
  • 3
    $\begingroup$ One difference is that in SSH, the encryption ciphers and the MACs are negotiated separately; in TLS, ciphers and MACs are a "suite", and are coupled together by a single value. $\endgroup$
    – Castaglia
    Apr 7, 2016 at 4:22
  • $\begingroup$ @SEJPM: TLS (except 1.3 which was after this Q) has many suites due to combinations, but the underlying primitives are about the same: TLS standardized RC4 (now withdrawn as broken) DES 3DES AES (CBC, GCM, CCM) and CHACHA, plus IDEA Camellia ARIA which almost noone uses; SSH had all the first group except CHACHA (which OpenSSH adds as an extension), with CTR but not CCM on AES, plus IDEA CAST Blowfish Twofish Serpent. I see that as almost neck-and-neck. Both used HMAC except where AEAD applies. SSH added Ed25519 faster, but TLS did in 2018. $\endgroup$ May 3, 2022 at 1:15

1 Answer 1

1
$\begingroup$

I have broken my head with this subject. Then, I begin to search on the internet and found your question (I believe the same as mine). So, this is my conclusion (of course is a simplification, there are other algorithms between other stuff)

I hope it helps. If I am wrong or could add new information, please let me know

Now, in short:

SSH

  1. Establish session: Firstly, it uses the Diffie-hellman algorithm to encrypt the session
  2. Authentication: secondly, it uses the RSA algorithm to authenticate inside the encrypted session.

TLS It needs two inputs to establish connection and authentication.

  1. Authentication: A certificate. (this certificate is issued by a Certificate Authority (CA).
  2. Establish session: An algorithm (Diffie-Hellman or RSA)

Next are links to my sources with details about the process of SSH and TLS at these links.

SSH https://www.linkedin.com/pulse/understanding-ssh-encryption-connection-process-robert-althof/

TLS https://www.cloudflare.com/learning/ssl/what-happens-in-a-tls-handshake/#:~:text=TLS%20is%20an%20encryption%20protocol%20designed%20to%20secure,they%20will%20use%2C%20and%20agree%20on%20session%20keys.

$\endgroup$
1
  • $\begingroup$ SSH does DH, either 'FFDH' (aka modp, Zp, classic, integer) or ECDH (including XDH) first, then authentication, but authentication is not limited to RSA; it can also use DSA (although one implementation, the biggest, OpenSSH, has deprecated and disabled DSA because in SSH it is limited to SHA1), or ECDSA or EdDSA, and potentially others like GOST. TLS through 1.2 mixes keyexchange with authentication, but TLS 1.3 rearranges them to keyexchange first (always DH) then authentication the same as SSH; cloudflare apparently hasn't been updated correctly in 4 years. $\endgroup$ May 3, 2022 at 1:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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