Private key cryptography uses the same key to encode and subsequently decode the message. Thus, only those who know the βsecretβ can read the message.
RSA security is based on 2 corresponding keys. There is a public key for each user, and everyone can (should) know this. There is also a private key that only the user should know. A message encrypted with a public key can only be decrypted with a private key, and vice versa.
Thus, if I want to send you a message that only you can read, I will receive (from the network) your public key, encrypt the message with this key, and you are the only one who can decrypt it.
Or, if I want to prove to you that I sent a message, I can encrypt the message with my private key, tell you (in plain text or in another message) how it was encrypted. Then you can decrypt the message with my public key, and if it becomes readable, you know that it came from me.
This form of encryption is used quite intensively by a computer, so sometimes you need to encrypt a one-time "secret key" using RSA technology, then encrypt the rest of the message with a secret key, and then encrypt my signature in the second way. Then you completely modify this process so that if the message and signature are readable, you and only you can read it, and you are sure that I sent the message.
OR
You can visit this link for a more detailed explanation.
How do API keys and private keys work?
SALMAN Jul 19 2018-12-12T00: 00Z
source share