简体   繁体   中英

Does NodeJS https perform symmetric encryption of the traffic

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM