The RSA key for example, can generate the public key from the private key, which is possible to encrypt a message with the private key. What I am trying to achieve is this:
- A encrypts a message using B's public key,
- B decrypts the message using its private key, but cannot encrypt a message and decrypt it by itself using its private key.
This is useful for validating that the message was sent by A.