On the one hand, I hear people say that these two keys are completely interchangeable, the first will decrypt what is encrypted by the second. This makes me think that these two keys are interchangeable.
But, on the other hand, the generated RSA keys have different lengths, and in another topic, encryption using the private key was called “signature” and was considered less secure than public key encryption. (2)
In addition to this comes the idea that the secret key should remain undisclosed when the public key must be openly distributed in the wild. (3)
I planned to receive data from a unique server, so my idea was to keep the public key on this server to encrypt data and distribute the private key to all possible clients, but this contradicts (3). Conversely, if I distribute public keys and encrypt my data using a private key, encryption is less secure in accordance with (2).
Do I have to distribute the public key and encrypt using the private one to satisfy (2) or vice versa?
NB: in my case, performance is not a problem.
source share