How can multiple receivers decrypt message with public key



  • If i encrypt a message with private key put the public key on server and send message to 2 enteties, how can the second one encrypt the message when the first one has the public key ?



  • Public key is meant to be namely public, means it should be available to everyone. I suppose that by saying that you put it to the server you mean you make it possible to download public key from your server.

    Everyone who wants to decrypt your message will download public key from your server, where you put it, and will decrypt the message.

    I'd suggest you to check the what you are trying to reach by such scheme.

    • Confidentiality? Everyone will be able to decrypt such messages. That's why you cannot reach confidentiality by using such scheme. If you need confidentiality, i.e. if you want that nobody except the receiver is able to decrypt the message, then you can use other scheme: Use public key of receiver-1 to encrypt messages to receiver-1. Then nobody except receiver-1 will be able to decrypt them. Messages to receiver-2 encrypt with pubic key of receiver-2. I don't go on details about hybrid encryption here.
    • Non-repudiation? It might be used for non-repudiation, because no one could produce such encrypted messages except you, the owner of the private key. Where as the idea is basically correct, a direct implementation would be insecure. See details here: encryption+decryption vs. signing. Instead of encryption+descryption use standard algorithms for digital signature like ECDSA.


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2