Skip to content

Commit

Permalink
This removes unused signature checking classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Aug 22, 2023
1 parent c0cde93 commit 32a2e4e
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 817 deletions.
1 change: 0 additions & 1 deletion nano/core_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ add_executable(
prioritization.cpp
request_aggregator.cpp
signal_manager.cpp
signing.cpp
socket.cpp
system.cpp
telemetry.cpp
Expand Down
250 changes: 0 additions & 250 deletions nano/core_test/signing.cpp

This file was deleted.

9 changes: 0 additions & 9 deletions nano/lib/numbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,6 @@ bool nano::validate_message (nano::public_key const & public_key, nano::uint256_
return validate_message (public_key, message.bytes.data (), sizeof (message.bytes), signature);
}

bool nano::validate_message_batch (const unsigned char ** m, size_t * mlen, const unsigned char ** pk, const unsigned char ** RS, size_t num, int * valid)
{
for (size_t i{ 0 }; i < num; ++i)
{
valid[i] = (0 == ed25519_sign_open (m[i], mlen[i], pk[i], RS[i]));
}
return true;
}

nano::uint128_union::uint128_union (std::string const & string_a)
{
auto error (decode_hex (string_a));
Expand Down
1 change: 0 additions & 1 deletion nano/lib/numbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ nano::signature sign_message (nano::raw_key const &, nano::public_key const &, n
nano::signature sign_message (nano::raw_key const &, nano::public_key const &, uint8_t const *, size_t);
bool validate_message (nano::public_key const &, nano::uint256_union const &, nano::signature const &);
bool validate_message (nano::public_key const &, uint8_t const *, size_t, nano::signature const &);
bool validate_message_batch (unsigned char const **, size_t *, unsigned char const **, unsigned char const **, size_t, int *);
nano::raw_key deterministic_key (nano::raw_key const &, uint32_t);
nano::public_key pub_key (nano::raw_key const &);

Expand Down
17 changes: 0 additions & 17 deletions nano/nano_node/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,23 +853,6 @@ int main (int argc, char * const * argv)
auto end (std::chrono::high_resolution_clock::now ());
std::cerr << "Signature verifications " << std::chrono::duration_cast<std::chrono::microseconds> (end - begin).count () << std::endl;
}
else if (vm.count ("debug_verify_profile_batch"))
{
nano::keypair key;
size_t batch_count (1000);
nano::uint256_union message;
nano::uint512_union signature (nano::sign_message (key.prv, key.pub, message));
std::vector<unsigned char const *> messages (batch_count, message.bytes.data ());
std::vector<size_t> lengths (batch_count, sizeof (message));
std::vector<unsigned char const *> pub_keys (batch_count, key.pub.bytes.data ());
std::vector<unsigned char const *> signatures (batch_count, signature.bytes.data ());
std::vector<int> verifications;
verifications.resize (batch_count);
auto begin (std::chrono::high_resolution_clock::now ());
nano::validate_message_batch (messages.data (), lengths.data (), pub_keys.data (), signatures.data (), batch_count, verifications.data ());
auto end (std::chrono::high_resolution_clock::now ());
std::cerr << "Batch signature verifications " << std::chrono::duration_cast<std::chrono::microseconds> (end - begin).count () << std::endl;
}
else if (vm.count ("debug_profile_sign"))
{
std::cerr << "Starting blocks signing profiling\n";
Expand Down
4 changes: 0 additions & 4 deletions nano/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ add_library(
scheduler/hinted.cpp
scheduler/optimistic.hpp
scheduler/optimistic.cpp
signatures.hpp
signatures.cpp
state_block_signature_verification.hpp
state_block_signature_verification.cpp
telemetry.hpp
telemetry.cpp
transport/channel.hpp
Expand Down
Loading

0 comments on commit 32a2e4e

Please sign in to comment.