0

I was thinking about using RSA, but in reverse. Where everyone has the private key, and only the server has the public key, so that all the clients can decrypt a message from the server, and the only the server can encrypt messages. When I googled it, everything talked about that the private key must stay private, So I was wondering: Does having a private key instead of a public key compromise the encryption?

Context: clients are getting large server information from peers (kinda like a bit torrent) and I wanted make sure that the information was from the server, and not messed with by a malicious user. Also: Assume getting a hash of the data from the server is not possible.

2

2 Answers 2

6

RSA: Do private keys have to be private? [...] Does having a private key instead of a public key compromise the encryption?

Yes. For the reason Mike (I upvoted.) gave: The private key and the public key are not alike and the pubkey can be derived from the privkey. (And AFAIK this inequality is mainly for performance reasons and can also only be this way around and not the other way around.)

so that all the clients can decrypt a message from the server, and the only the server can encrypt messages.

What you're describing amounts to a signature scheme. Everybody can be a recipient of messages but only a few participants can compose valid messages. This is functionally the same as as sending the message in the clear but attaching a signature to it. And signatures you can do with the privkey and verify with the pubkey.

Note: While they are related and it's sometimes explained as such: signing is NOT the same as encrypting with the private key. And verifying is not the same as decrypting with the public key.

4

With RSA, the public key can easily be derived from the private key. So there's no way to release the private key and keep the public key secret, since anyone with the private key can then calculate the public key. See this Stackoverflow question and answers.

2
  • Is there an encryption that public key decrypts and the private key encrypts? Nov 9, 2015 at 15:57
  • @GrantDavis that's what RSA does to create signatures
    – Natanael
    Nov 9, 2015 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .