Re: [cryptopp-users] Re: Retrieving public key from x and y

2021-09-21 Thread Benjamin Schäfer
Okay, I've read the articles, but somehow I don't know where to start. I have to use the public key, generated out of x and y, algorith brainpool, to encrypt a JWT. The JWT is generated with the cpp-jwt library and now I really don't know what to do. How can I "convert" the public key I got

Re: [cryptopp-users] Re: Retrieving public key from x and y

2021-09-21 Thread Jeffrey Walton
On Tue, Sep 21, 2021 at 10:40 AM Jeffrey Walton wrote: > ... > Typically you don't simply encrypt with an elliptic curve. Typically > encryption using elliptic curves is a hybrid public key encryption > scheme, like ECIES. In ECIES, you encrypt a bulk encryption key for a > block cipher like AES

Re: [cryptopp-users] Re: Retrieving public key from x and y

2021-09-21 Thread Jeffrey Walton
On Tue, Sep 21, 2021 at 9:54 AM Benjamin Schäfer wrote: > > In the end it could be broke down to: I want to encrypt a std::string (the > JSON Web Token) with the public key I created out of x and y with crypto++. I > will take a look into OpenSSL and what I could do with that, but this project

Re: [cryptopp-users] Re: Retrieving public key from x and y

2021-09-21 Thread Benjamin Schäfer
In the end it could be broke down to: I want to encrypt a std::string (the JSON Web Token) with the public key I created out of x and y with crypto++. I will take a look into OpenSSL and what I could do with that, but this project seems to get out of hand. Jeffrey Walton schrieb am Dienstag,

Re: [cryptopp-users] Re: Retrieving public key from x and y

2021-09-21 Thread Jeffrey Walton
> How can I "convert" the public key I got from > > CryptoPP::ECDSA::PublicKey publicKey; > publicKey.Initialize(CryptoPP::ASN1::brainpoolP256r1(), q); > > to the needed byte array. What do I have to use as initialisation vector? I'm > no pro in crypto-algorithms but I have to use them for a