-
Notifications
You must be signed in to change notification settings - Fork 114
Remove unnecessary signature algorithms #755
Conversation
efb4804
to
5091de0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you ran a live test yet and tested a client/server tunnel? Like I said in IRC, simply removing the signatures won't work. I can finish the remainder of the review this week but please do continue development in the meantime.
src/core/router/info.h
Outdated
MinBuffer = core::DSA_SIGNATURE_LENGTH, // TODO(unassigned): see #498 | ||
MaxBuffer = 2048, // TODO(anonimal): review if arbitrary | ||
MinBuffer = core::EDDSA25519_SIGNATURE_LENGTH, // TODO(unassigned): see #498 | ||
MaxBuffer = core::RSASHA5124096_KEY_LENGTH, // TODO(anonimal): review if arbitrary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MaxBuffer = core::RSASHA5124096_KEY_LENGTH
This quickly breaks functionality. See the use-case for MaxBuffer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize this breaks functionality. I'll revert MaxBuffer, and do some reading. Is the MinBuffer value still fine?
I haven't checked with a full live test yet. Was able to start Kovri, and got it to connect to peers. Any tips for writing integration tests for Kovri? |
Aside from the prelim Boost.Python work and testnet, there's nothing currently in-place aside from running the router and testing tunnels manually. |
Just ran into a connection bug with a pull from the latest master. Thought it might have been something from my changes, so cloned a fresh copy, and same bug came up with building tunnels. A few different errors keep popping up, (some rejections, timeouts, missing parts, etc.). The project builds fine, and runs without crashing. Here is a gist of the error logs Should I open an issue for this? |
Those are all known and actual error reporting needs fine-tuning (tunnel building works regardless). Not related to this PR, no need for a new issue. |
The above reference was regarding nightmare code #366. |
An update/clarifications:
|
Thanks for your notes and work on this PR. Apologies for lack of reply, was unable to access my accounts.
Totally understand. I'll keep working on the points you brought up, hopefully ready by release after this one :)
Will look for areas in code to shorten the gap between confirming DSA reseed entries, and deleting them from NetDb. Is there a minimum amount of time the entries need to stay in the NetDb?
Will look into sections of the code dealing with this scenario, and get an understanding of what those silent failures are.
Is it possible to separate the DSA entry from the rest of the LeaseSet? Does one member rely on all others in the set? Like in the catch scenario, was thinking about carving out the DSA entry(s), and replacing them with valid entries from elsewhere / doing a DatabaseStore reorg to only include ed25519 in LeaseSet. Not sure how that would work in code, or if it is even a good idea on the conceptual level. Many thanks for the pointers on where to go from here. Side note: ran another live test after merging latest master, and now getting SIGILL on |
IIRC, should be if implemented.
Ok. Let's see what you come up with. |
src/core/router/identity.cc
Outdated
// TODO(unassigned): should an exception be raised here? | ||
// since an unsupported setup is used when the above condition is false? | ||
std::unique_ptr<std::uint8_t[]> null_key = std::make_unique<std::uint8_t[]>(m_ExtendedLen - 2); | ||
return bufbe16toh(null_key.get()); // null crypto key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely not the correct solution, only fixes SIGILL runtime
interrupt.
std::unique_ptrstd::uint8_t[] null_key = std::make_uniquestd::uint8_t[](m_ExtendedLen - 2);
return bufbe16toh(null_key.get()); // null crypto key
Not a real fix. If you drop this commit and rebase the branch, I can start sending in the patches I mentioned earlier.
src/core/router/identity.cc
Outdated
// TODO(unassigned): should an exception be raised here? | ||
// since an unsupported setup is used when the above condition is false? | ||
std::unique_ptr<std::uint8_t[]> null_key = std::make_unique<std::uint8_t[]>(m_ExtendedLen); | ||
return bufbe16toh(null_key.get()); // signing key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely not the correct solution, only fixes SIGILL runtime
interrupt.
std::unique_ptrstd::uint8_t[] null_key = std::make_uniquestd::uint8_t[](m_ExtendedLen);
return bufbe16toh(null_key.get()); // signing key
Not a real fix. If you drop this commit and rebase the branch, I can start sending in the patches I mentioned earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can drop that commit no problem, where should I rebase the branch to? Just don't want all the comments to get deleted, unless that's not a problem.
c08ddc9
to
ee55305
Compare
wtf, just tried to reset the last two commits, and Github auto-close the PR... |
Hmm, can you reopen? |
|
4aa25f1
to
981261d
Compare
Removes signatures no longer needed for verifying RouterIdentity signatures. Keeps ed25519 and Elgamal+SHA512 for current (0.9.16+) I2P routers.
981261d
to
ca04ff4
Compare
@anonimal, after researching docs and code a bit, found the m_ExcludedPeers vector of IdentHash(es). Wasn't sure if it was the right bag to put newly found What I was thinking was somehow store For example, here in the The "remove it" part is where I'm struggling. Not sure that the Edit Bad idea, could be used to de-anonymize clients: ~~~Would it make more sense to store unsupported destinations with a "blacklist" flag in the Or possibly using peer profiling to exclude invalid peers? Edit <- Researching best way to do this using RouterInfo and RouterContext. Similar sections in the datagram api, where we can match on all unsupported signature types. |
This does not fix the broken functionality caused by ca04ff4. See monero-project#755 for details.
This does not fix the broken functionality caused by ca04ff4. See monero-project#755 for details.
This does not fix the broken functionality caused by ca04ff4. See monero-project#755 for details.
This does not fix the broken functionality caused by ca04ff4. See monero-project#755 for details.
Reject DatabaseLookup messages for LeaseSets with signature types other than EDDSA_SHA512_ED25519. Referencing monero-project#755
Test harness for the NetDb implementation, and a minimal fixture for RouterInfo. Helper function CreateRouterInfoBuffer() is a factory for RouterIdentity's with different signing key types. Referencing monero-project#755
1c92075
to
67885be
Compare
Test harness for the NetDb implementation, and a minimal fixture for RouterInfo. Helper function CreateRouterInfoBuffer() is a factory for RouterIdentity's with different signing key types. Referencing monero-project#755
By submitting this pull-request, I confirm the following:
Remove signatures according to #498