Hi,
I'm a beginner both with Crypto++ and cryptography in general, so, please forgive me if the question is too basic. I'm implementing the client for a custom protocol at my company that requires, at some point, to use the public key generated by ECDH to encrypt a challenge message, the server then decrypts this message using its private key. I understand ECDSA makes something similar, however, I do need to use ECDH, since later the agreed secret is used as well.
My question is, given that the server's public key was sent to me raw, i.e., the bytes encrypted as an hex-encoded stream, how can I then set the ECIES object public key to encrypt a message? I've tried using Integer to encode the bytes using DER and then loading the key via Load method, but there's always a format exception. What am I missing here?
Thanks in advance!