load a public key always show this error: CryptoPP::BERDecodeErr: BER decode error

114 views
Skip to first unread message

陈剑南

unread,
Aug 24, 2019, 12:11:16 AM8/24/19
to Crypto++ Users
std::string PublicKeyString("MHYwTwYGKw4HAgEBMEUCIQDebUvQDd9UPMmD27BJovZSIgWfexL0SWkfJQPMLsJvMwIgDy/kEthwO6Q+L8XHnzumnEKs+txH8QkQD+M/8u82ql0DIwACIAY6rfW+BTcRZ9QAJovgoB8DgNLJ8ocqOeF4nEBB0DHH");
    CryptoPP::ByteQueue queue;
    CryptoPP::Base64Decoder decoder(new CryptoPP::Redirector(queue));
    decoder.Put((const Byte *) PublicKeyString.data(), PublicKeyString.size());
    decoder.MessageEnd();
    CryptoPP::ElGamal::Encryptor encryptor;
    encryptor.AccessKey().Load(queue);

Jeffrey Walton

unread,
Aug 24, 2019, 2:45:16 AM8/24/19
to Crypto++ Users
Where did the ElGamal key come from? Crypto++ or elsewhere?

If Crypto++, what version created it and what version is trying to load it?


Jeff

陈剑南

unread,
Aug 24, 2019, 4:34:55 AM8/24/19
to Crypto++ Users
it's back end generate private key and public key

在 2019年8月24日星期六 UTC+8下午2:45:16,Jeffrey Walton写道:

Jeffrey Walton

unread,
Aug 24, 2019, 4:52:42 AM8/24/19
to 陈剑南, Crypto++ Users
On Sat, Aug 24, 2019 at 4:34 AM 陈剑南 <cjn...@gmail.com> wrote:
>
> it's back end generate private key and public key

What backend? What is the program? What is the library?
Reply all
Reply to author
Forward
0 new messages