How does Mega's encryption work for sharing?

后端 未结 2 1283
野性不改
野性不改 2020-12-28 23:27

I have some issues regarding to find a way to achieve the encryption of arbitrary data that can be shared with multiple recipients. Mega seems to do exactly that. As far as

2条回答
  •  猫巷女王i
    2020-12-28 23:35

    In Mega, every user has a master key. Every user also has a public/private key pair. And every file is encrypted under different session key. Session keys are encrypted under user's master key.

    If Alice wants to share her file with Bob, first she decrypts the file's session key using her master key, then she encrypts the session key under Bob's public key.

    Now Bob can use his private key to decrypt Alice's file.

    The above is just an intuitive explanation. You will find more information from Mega's api (and its source code).

提交回复
热议问题