Public key encryption and private encryption
I have implemented asymmetric encryption in my project using a "public key" to "encrypt" the message and a "private key" to "decrypt" the message.
Do we use the "private key" to "encrypt" the message and the "public key" to "decrypt". If yes, can anyone give me an example of a use case and this cryptography is also called "asymmetric encryption"
source to share
Since the term encryption is considered in the message itself, the answer is no , because such encryption is completely useless. Since the public key must be publicly available, anyone can use it to decrypt. Thus, private key encryption does not provide confidentiality.
Signing on the other hand, as mentioned, is the only precedent for this. It does not apply encryption to the actual payload (message). It encrypts a cryptographic hash over a message (which can only be reproduced from the same message) using a different padding scheme. This way, you can be sure that the actual party who has the private key signed the message.
source to share