Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix public key prefix protocol bug #5665

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NumberFour8
Copy link
Contributor

The protocol design was relying on the first byte of public key to never be equal to 0xff. This was true for secp256k1 keys.

However, it is not the case for Ed25519 public keys as the top-most bit is set depending on the point sign.

This PR fixes this problem by re-organizing the header format, so that the path position is the first byte (possible values: 0x00, 0x01, 0x02) and the 0xff is set for the last hop.

This change is backwards incompatible, so it should be merged along with the next backwards incompatible release.

@NumberFour8 NumberFour8 added bug Something isn't working package:core labels Oct 24, 2023
@NumberFour8 NumberFour8 requested a review from a team October 24, 2023 19:34
@NumberFour8 NumberFour8 self-assigned this Oct 24, 2023
Copy link
Contributor

@tolbrino tolbrino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking until we can merge it

NumberFour8 added a commit that referenced this pull request Oct 25, 2023
Also issues a warning to the logs if such key is already in-use.

This is a temporary solution, until a backwards compatible fix is merged in #5665

Closes #5666
Closes #5667
@NumberFour8
Copy link
Contributor Author

This goes in 3.0

@Teebor-Choka Teebor-Choka added this to the 3.0.X - kaunas roadmap milestone Jan 18, 2024
@tolbrino tolbrino removed this from the 3.0.X - kaunas roadmap milestone Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: 🔖 scheduled
Development

Successfully merging this pull request may close these issues.

None yet

3 participants