0
0
mirror of https://github.com/monero-project/kovri synced 2025-10-06 08:42:45 +02:00

Crypto: remove ed25519 assertions

The verifier assertion won't allow the verifier to simply return, from
which we then throw accordingly. The signer assertion should be removed
because we throw on bad signing anyway.
This commit is contained in:
anonimal
2018-07-24 00:18:00 +00:00
parent 5fcee5f949
commit ee6d9d2a39

View File

@@ -45,7 +45,6 @@
#include <algorithm>
#include <array>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <memory>
@@ -844,8 +843,6 @@ class Ed25519Verifier::Ed25519VerifierImpl
int const ret(CryptoPP::NaCl::crypto_sign_open(
rm, &rmlen, sm.data(), sm.size(), m_Pk.data()));
assert(rmlen == mlen);
return !ret;
}
@@ -905,7 +902,6 @@ class Ed25519Signer::Ed25519SignerImpl
CryptoPP::Exception::OTHER_ERROR, "could not ed25519 sign message");
// We only want the signature
assert(sm.size() == smlen);
std::copy(sm.begin(), sm.end() - mlen, signature);
}