eli5: why do public keys encrypt some messages the same?

340 views

I heard that along with a public key, you need a initalization vector so that messages are not encryption identically in different instances. Since all a public key does is multiple prime numbers together, why are some keys the same as others? There are an infinite number of prime numbers (I think) so there should be no problem.

In: 0

5 Answers

Anonymous 0 Comments

Your Public key is not likely to be the same as another person’s. It’s possible, if you both generated the same private key from some bad implementation, but as soon as you notice that you need to change keys.

That said, every time you encrypt the same message with your key, you will get the same answer. It’s math, and getting the same answer every time is the way it needs to work. So getting the same message isn’t the same thing as having the same key. You really ought to add a little IV to your message, to guard against that, as /u/DeHackEd explains in detail.

You are viewing 1 out of 5 answers, click here to view all answers.