2

I am using AES to create a secure tunnel for transmission of data.

As the symmetric key encryption will require the same key to encrypt and decrypt, so we need to generate the exact same key for the decrypt process. Is there any possible way for me to generate the exact same key for both side?

zebiskin
  • 41
  • 5

1 Answers1

15

There are two main ways to have the same symmetric key on both parties:

The former is what you will find in TLS, where public key infrastructure is used to verify the other party's public key.

The latter is used in things like command-line encryption tools to derive a symmetric key from a password (and salt).

If you wish to setup a secure communications channel, your first choice should be TLS unless you have a very good reason not to use it.

Marc
  • 1,583
  • 1
  • 17
  • 17