security - How to resist MITM and replay attacks when sending encrypted data? -


Assuming that I've safely exchanged keys with any other computer (perhaps using Diffie-Hellman ), Here is my temporary solution:

Packet Number + Encrypted Data + Message Authentication Code (MAC)

Packet number 0 starts with an incremental There is an increasing number of forms. After this, both of the encrypted data itself, one after the MAC. If someone tries to attack the MITM, then Mac must fail to compute. If they want to play again, the recipient will know that he has already received that packet number.

Is there any flaw in my argument?

This is the place where you have to face the biggest danger - if the man-central-central key exchange Manages to control (for example, by establishing a key along with the customer, and by establishing another key with the server), then MITM can decrypt (and re-encrypt) everything safe key exchange After the establishment, you will be discriminated against for the MITM attack If need be. But the hard part is to ensure that the key exchange is actually safe.

For information about this, consult (or) by Ferguson and Shenyer.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -