Use ECDH key to encrypt with ECIES

26 views
Skip to first unread message

Luciano Santos

unread,
Sep 28, 2015, 6:03:10 PM9/28/15
to Crypto++ Users
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!

Luciano Santos

unread,
Sep 29, 2015, 7:15:49 PM9/29/15
to Crypto++ Users
I'm not really sure if anyone understood my question, however, just wanted to let you know I've found an answer. My own findings are at http://stackoverflow.com/questions/32832661/crypto-use-ecdh-key-with-ecies.

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-user...@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to a topic in the Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cryptopp-users/M2xXeONrpX0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cryptopp-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages