Encrypting large files using a public key

前端 未结 5 2093
遥遥无期
遥遥无期 2020-12-17 19:42

I need to encrypt a 100KB file using a public key. I\'ve been reading some posts claiming that it is not practical to directly encrypt large files using a public key, and th

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 20:18

    The hybrid approach you mention (generate a random symmetric key, use this to encrypt the data, and encrypt only the key asymmetrically) has a massive performance advantage.

    You could "break the large file to pieces and encrypt each one of them using the same public key" as well, there is nothing wrong with that, but it is much slower.

提交回复
热议问题