My main purpose of this question is that i do not want the receiver to know how to decrpyt the data which I included in the image using steganography. I wanted to use asymmetric type algorithm and not symmetric. Is it possible to create a system like RSA where instead of using public key of receiver to encrypt and private key of receiver to decrypt , I want to encrypt with receiver's public key and decryption is possible only with senders private key. I am trying accomplish ownership.
I want to encrypt with receiver's public key and decryption is possible only with senders private key. I am trying accomplish ownership.
In RSA, private and public keys are mathematically tied together. You are mentioning senders private key and recieviers public key. These two are not related to each other and can't be used in a way you described.
What you can do is following (without going into too much details about each specific step):
- Generate RSA key par (private and public) for sender and distribute public key to all participants
- Generate symmetric key for sender and keep it secret to sender only
- Encrypt the data with symmetric algorithm (AES for example) using the key generated in step 2.
- Sign the ciphertext you got from step 3. with senders private key
- Send signed ciphertext to the receiver
- Receiver can verify the ciphertext came from sender by using senders public key to check the signature but cannot decrypt the ciphertext. Only sender has the key to decrypt the ciphertext.
- For all subsequent messages go to step 3.