I'm trying to learn libsodium to better my crypto knowledge. One nagging question I have is what is the difference between libsodium's sealed box and their normal box? Not in terms of technicalities as the docs do distinguish this well; but in terms of practical use cases.
Per the docs:
Sealed boxes are designed to anonymously send messages to a recipient given its public key.
Only the recipient can decrypt these messages, using its private key. While the recipient can verify the integrity of the message, it cannot verify the identity of the sender.
A message is encrypted using an ephemeral key pair, whose secret part is destroyed right after the encryption process.
Without knowing the secret key used for a given message, the sender cannot decrypt its own message later. And without additional data, a message cannot be correlated with the identity of its sender.
Sadly this doesn't address the use case when this is needed. For example Say Alice generates a keypair and gives Charlie the untrusted 3rd party the public key for storage. Bob asks Charlie for the public key and sends Alice a message using said public key. From my limited understanding of this this should be secure and prevent Charlie from knowing the message. Is this not your basic end-to-end-trust-no-one system in the same vein as PGP?
If this system were to be implemented with an ephemeral key exchange as suggested by the sealed box concept would that not just add more overhead to an already secure system?
Perhaps I'm misunderstanding and perhaps my intended use case is different which is why I'll explain my mental model to better give context. (Also note I think the signal protocol uses ephemeral pre-keys and I also don't understand why in that context).
Alice runs an app on her phone which generates a unique keypair (unique in that it regenerates a new one every time the app opens) and then registers a unique address along with her public key with Charlie the back end server. The app then presents Alice with a URL that contains her unique address and a nonce. She shares this link with Bob who also opens the app providing it with the address and nonce. Bob's app generates a unique keypair then asks Charlie for Alice's public key (based on the address). Bob's app then encrypts Bob's public key along with the nonce and sends it to Alice (via Charlie). Alice's app verifies the nonce and then uses the provided Bob's public key and is now able to send him messages back.
AFAICT the above is a very basic key exchange through a third party in the same way we handle PGP key sharing on a key-server with the distinct difference in that once the session is over (app closed) the keys are no longer valid (secret keys erased) and a new session would be completely new identities and keypairs.
Is this even remotely related to the use of sealed boxes or have I only proved that I am sleep deprived and know nothing about crypto?