0
$\begingroup$

Let's say I have generated a private and a public key. I create a message and encrypt it with the public key. I deliver this encrypted message and a private key to multiple recipients.

Why would I do this?

I want to be able to deliver a message that can only be decrypted. I don't want anyone to be able to encrypt a dummy message and deliver this to all recipients with them assuming it was from me.

I think I am on the right track using RSA - but somehow I need it all in reverse.

Also, if I give people the private key, and I keep the public key safe, am I right in believing that it's possible to generate a new public key just using the private key itself?

Let's take an example of my problem.

I create an encrypted message using my public key:

ajjfjdksdjkdfjfjdjfd (made up example).

The end user decrypts it using the private key to:

green:1234:table

All good so far. The above message and be authenticated very basically checked for the three strings within a ":".

However, as these encrypted messages could be from untrusted sources, I want it impossible for any untrusted source to be able to create these messages since they know the simple format. I don't want the key I provide be enough for them to reverse engineer the public key.

I am finding it hard to explain, I am hoping that this can be answered.

$\endgroup$
2
$\begingroup$

Also, if I give people the private key, and I keep the public key safe, am I right in believing that it's possible to generate a new public key just using the private key itself?

Correct. The private key contains the modulus, one or more of the primes, the private exponent and often some other relevant things. The public key is just the modulus and the public exponent, which is usually a small number, often 65537, and can be calculated with the private key even if it isn't.


What you actually need for your problem is authentication. You sign the data (e.g. with RSA-PSS), which you may have encrypted (whether with a symmetric key that you give the recipients or their public keys). The data can even be public if its secrecy does not matter.

The recipients can then use your public key (which they must somehow get first) to verify that the data was signed with your private key. Assuming you do not reveal your key, no one else can forge a valid signature.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.