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: use sha256, apply sc_reduce32 and change salt in key derivation #4

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

detherminal
Copy link

@detherminal detherminal commented Feb 19, 2025

Change Sha3_256 to Sha256 and make necessary changes to salt.

Take a look at Cake Wallet's polyseed implementation in Dart:

https://github.com/cake-tech/polyseed_dart/blob/cc3092ef0289c45520a098becb2ee8fb25adf50f/lib/src/polyseed.dart#L174-L195

We also need to add coin index to the 17th byte of salt but it is not necessary as this crate is only for Monero.

EDIT (25.02.2025):

Also added applying sc_reduce32 instead of direct convertion. Direct version gives error even if the entropy is correct.

@detherminal detherminal changed the title fix: use sha256 and change salt in key derivation fix: use sha256, apply sc_reduce32 and change salt in key derivation Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant