flâneur — a map of the web's best reading

Sealed boxes | Libsodium documentation

libsodium.gitbook.io · 517 words · saved by 1 readers

Only the recipient can decrypt these messages using their private key. While the recipient can verify the integrity of the message, they cannot verify the identity of the sender. A message is encrypted using an ephemeral key pair, with the secret key being erased right after the encryption process. Without knowing the secret key used for a given message, the sender cannot decrypt the message later. Furthermore, without additional data, a message cannot be correlated with the identity of its sender. The crypto_box_seal() function encrypts a message m of length mlen for a recipient whose public key is pk. It puts the ciphertext, whose length is crypto_box_SEALBYTES + mlen, into c. The function creates a new key pair for each message and attaches the public key to the ciphertext. The secret key is overwritten and is not accessible after this function returns. The crypto_box_seal_open() function decrypts the ciphertext c, whose length is clen, using the key pair (pk, sk) and puts the decry

Explore this link on the map →

saved by