I'm using SJCL js library: How do I use the elGamal algorithm to prove that a user posses the private key based on the public key? I also utilize the ECCDH part so I can't just use ECDSA.
I want everybody to be able to verify that the user, who posses that private key actually wrote the message, actually made the request, by using his/her public key to decrypt the message.
request message -> encrypt with private key -> send it -> everybody can decrypt the message by using his public key, proving he actually made the request
I am very new to cryptography, I have learned that in asymmetric you can use the private key to encrypt the file but I can't seem to find this tool on SJCL.
I have attached a screenshot of my attempt below please let me know where I am doing it wrong. Thank you
]1