-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
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). |
@kayabaNerve Could you please ACK the last changes as well and I'll merge it into master? Thanks! |
LGTM |
core/src/test/java/knaccc/monero/address/WalletAddressTest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Show resolved
Hide resolved
core/src/main/java/bisq/core/xmr/knaccc/monero/address/WalletAddress.java
Outdated
Show resolved
Hide resolved
@Boog900 Would you be able to review that PR as well? I am not familiar enough with Monero details. |
core/src/test/java/knaccc/monero/address/WalletAddressTest.java
Outdated
Show resolved
Hide resolved
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.
utACK
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.
utACK
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.