1

I am creating a Node.js server with a secure connection based on an answer from SO.

Code from the answer,

var https = require('https');

From what i understand, there are two parts to secure connection.

  1. SSL handshake which does a certificate verification and symmetric key exchange.
  2. Encrypting the traffic with the symmetric key.

Does https perform only SSL handshake? Does it take care of decrypting the request and encrypting the response? does it use a symmetric key algorithm? does it use AES? If it does not use symmetric key encryption, How can i do that?

Is the traffic flowing encrypted?

P.S: I have left a comment under the answer i quoted. Hope it is alright to derive questions from an answer on SO.

ProgramCpp
  • 1,280
  • 2
  • 15
  • 26

1 Answers1

3

From what i understand, there are two parts to secure connection.

  1. SSL handshake which does a certificate verification and symmetric key exchange.

Certificate verification and symmetric key negotiation.

Encrypting the traffic with the symmetric key.

Correct.

Does https perform only SSL handshake?

HTTPS doesn't do any of it. HTTPS is just HTTP over TLS. TLS does the handshake and the encrypting. The only additional thing HTTPS does is hostname verification.

Does it take care of decrypting the request and encrypting the response?

Yes.

does it use a symmetric key algorithm?

Yes. You already said that above yourself.

does it use AES?

It uses any of a large number of ciphers by agreement between the peers.

If it does not use symmetric key encryption, How can i do that?

It does, and you don't.

Is the traffic flowing encrypted?

For the fourth time, yes.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • If TLS does the encryption. How does this solution encrypt the traffic without using a TLS package. I think https uses the TLS library. Could you please explain that part? From the code, i dont see how TLS is used. – ProgramCpp Sep 06 '17 at 14:37
  • 1
    What makes you think it doesn't use a TLS package? Of course it does. – user207421 Sep 08 '17 at 07:13