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

Validate that XMR subaddress view key matches the main address #6612

Merged
merged 4 commits into from Apr 3, 2023
Merged

Conversation

ghost
Copy link

@ghost ghost commented Mar 22, 2023

Fixes #6611
Resolves #6613 via 165f2d0

The XMR account can only be saved if the supplied view key matches the address.
Private view key -> generates public view key -> compare with main address part.


xmr_subaddress_check1

 

xmr_subaddress_check2

 

xmr_subaddress_check3

@kayabaNerve
Copy link

This also needs to check the private view key is a valid scalar. The scalarmul will return invalid outputs for unreduced scalars, as noted in #6613. While Bisq could reduce the scalar on its end, Monero should never provide an unreduced scalar, so there's no benefit to supporting them (it just increases the likelihood of an error).

@ripcurlx
Copy link
Contributor

@kayabaNerve Could you please ACK the last changes as well and I'll merge it into master? Thanks!

@kayabaNerve
Copy link

LGTM

@HenrikJannsen
Copy link
Collaborator

@Boog900 Would you be able to review that PR as well? I am not familiar enough with Monero details.

Copy link
Collaborator

@HenrikJannsen HenrikJannsen left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

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

utACK

@alejandrogarcia83 alejandrogarcia83 merged commit 00c4319 into bisq-network:master Apr 3, 2023
@alejandrogarcia83 alejandrogarcia83 added this to the v1.9.10 milestone Apr 3, 2023
@ghost ghost mentioned this pull request Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants