|
@ -53,6 +53,10 @@ void Secp256k1::decrypt(Secret const& _k, bytes& io_text) |
|
|
CryptoPP::ECIES<CryptoPP::ECP>::Decryptor d; |
|
|
CryptoPP::ECIES<CryptoPP::ECP>::Decryptor d; |
|
|
initializeDLScheme(_k, d); |
|
|
initializeDLScheme(_k, d); |
|
|
|
|
|
|
|
|
|
|
|
// todo: test ecies w/null plaintext or ciphertext of \0
|
|
|
|
|
|
if (!io_text.size()) |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
size_t clen = io_text.size(); |
|
|
size_t clen = io_text.size(); |
|
|
bytes plain; |
|
|
bytes plain; |
|
|
plain.resize(d.MaxPlaintextLength(io_text.size())); |
|
|
plain.resize(d.MaxPlaintextLength(io_text.size())); |
|
|