I'm trying out some encryption and I'm wondering if I'm doing it correctly.
The idea is a two layer encryption ensuring the sender is the sender, while having the proxy not knowing what the content of the message is from the sender (since the proxy knows the id of the sender). Then remove the ID of the sender and send the data to the LAST receiver which only can access the message and not the id of the sender.
I have a client that:
- Encrypts a message with a symmetric key, and only the message content.
- Encrypts the symmetric key with the LAST receiver's public key.
- Encrypts the encrypted message again with a Proxy public key.
Proxy receives the encrypted data and should just verify that the sender is the actual sender. Then remove the sender's id and send it to the LAST receiver only having an encrypted message with no id of the sender which it can decrypt using the symmetric key.
What should I sign, and how should I encrypt the encrypted message and private key? In one or two separate?