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

[Security]: Generate random salt when creating/importing new wallet #4069

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

satoshiotomakan
Copy link
Collaborator

Description

Starting from Nov 23, 2021 at e110188, WalletCore always uses empty salt for PrivateKey/Mnemonic encryption.
This PR changes the behaviour to always generate random salt on creating/importing new wallets.

How to test

Run C++, iOS, Android tests

Types of changes

  • Remove ScryptEncryption::Minimal, ScryptEncryption::Weak, ScryptEncryption::Standard constants
  • Add ScryptEncryption::minimal(), ScryptEncryption::weak(), ScryptEncryption::standard() constructors that always generate random salt

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

Copy link

Binary size comparison

➡️ aarch64-apple-ios: 12.18 MB

➡️ aarch64-apple-ios-sim: 12.18 MB

➡️ aarch64-linux-android: 15.62 MB

➡️ armv7-linux-androideabi: 13.33 MB

➡️ wasm32-unknown-emscripten: 11.08 MB

@satoshiotomakan satoshiotomakan merged commit 8c605ed into master Oct 18, 2024
13 checks passed
@satoshiotomakan satoshiotomakan deleted the s/scrypt-salt branch October 18, 2024 07:41
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.

2 participants