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(NOTIFY-1190): key generation bug for react native scrypt #4755

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

mathieuartu
Copy link
Contributor

@mathieuartu mathieuartu commented Oct 2, 2024

Explanation

This PR fixes a bug where we passed a string parameter instead of a UInt8Array to the react native scrypt function.
This resulted in faulty key generation, bugs in encryption / decryption, and inconsistencies between mobile and the other clients.

References

https://consensyssoftware.atlassian.net/browse/NOTIFY-1190

Changelog

@metamask/profile-sync-controller

  • CHANGED (BREAKING): use UInt8Array instead of string for the password argument of nativeScryptCrypto

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mathieuartu mathieuartu added the team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications label Oct 2, 2024
@mathieuartu mathieuartu marked this pull request as ready for review October 2, 2024 18:38
@mathieuartu mathieuartu requested a review from a team as a code owner October 2, 2024 18:38
Copy link
Contributor

@Jonathansoufer Jonathansoufer left a comment

Choose a reason for hiding this comment

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

amazing work!

@mathieuartu mathieuartu merged commit f35d364 into main Oct 3, 2024
117 checks passed
@mathieuartu mathieuartu deleted the fix/key_generation_scrypt_mobile branch October 3, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-notifications Notification Team changes. https://github.com/orgs/MetaMask/teams/notifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants