On Monday, July 30, 2018 at 3:02:57 PM UTC-4, Abdelkrim Fitouri wrote: > > Hello, > > I am using the cryptopp 7.0 on a project, > > I am wondering if i can use keys generated with ECDSA on a ECIES > encryption process, >
I'm thinking probably not when using ECDSA::Save() and ECIES::Load() like you are doing below. Save() and Load() use the PKCS8 or X509 keys, which includes subject information like OIDs. In its bowels ECDSA and ECIES differ from one another in the PKCS8 and X509 keys are different serialized formats. ECIES uses a Diffie-Hellman style key. You may be able to do it using DEREncode() and BERDecode(). They read and write the inner key material without the outer subject information. You almost certainly can do it by assigning parameters but I am not sure how correct things will be. The two you are interested in are the private exponent and public element. You can find examples of accessing the private exponent and public element at https://www.cryptopp.com/wiki/Elliptic_Curve_Digital_Signature_Algorithm and https://www.cryptopp.com/wiki/Elliptic_Curve_Diffie-Hellman . I have to say "I am not sure how correct things will be" because Diffie-Hellman/ECIES only has a private key (with some hand waiving). When a public key is needed for key exchange or ECIES encryption a temporary one is generated at random and used. Jeff -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
