-
Notifications
You must be signed in to change notification settings - Fork 884
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
Wallet openssl ed25519 #26770
base: master
Are you sure you want to change the base?
Wallet openssl ed25519 #26770
Conversation
963dcb0
to
8f325e8
Compare
e7e8470
to
1cd3484
Compare
[puLL-Merge] - brave/brave-core@26770 Here's my review of the pull request: DescriptionThis PR refactors the Ed25519 key derivation implementation to use the ChangesChangescomponents/brave_wallet/browser/BUILD.gn:
components/brave_wallet/browser/internal/BUILD.gn:
components/brave_wallet/browser/internal/hd_key.cc:
components/brave_wallet/browser/internal/hd_key_ed25519.cc and .h:
components/brave_wallet/browser/solana_keyring.cc:
components/brave_wallet/common/hash_utils.h and .cc:
components/brave_wallet/rust/BUILD.gn:
components/brave_wallet/rust/lib.rs:
sequenceDiagram
participant Client
participant HDKeyEd25519
participant RustLib
participant Ed25519DalekBip32
Client->>HDKeyEd25519: Generate from seed
HDKeyEd25519->>RustLib: generate_ed25519_extended_secret_key_from_seed
RustLib->>Ed25519DalekBip32: ExtendedSigningKey::from_seed
Ed25519DalekBip32-->>RustLib: ExtendedSigningKey
RustLib-->>HDKeyEd25519: Ed25519DalekExtendedSecretKey
HDKeyEd25519-->>Client: HDKeyEd25519 instance
Client->>HDKeyEd25519: Derive child
HDKeyEd25519->>RustLib: derive_hardened_child
RustLib->>Ed25519DalekBip32: derive_child
Ed25519DalekBip32-->>RustLib: ExtendedSigningKey
RustLib-->>HDKeyEd25519: Ed25519DalekExtendedSecretKey
HDKeyEd25519-->>Client: HDKeyEd25519 instance
Client->>HDKeyEd25519: Sign message
HDKeyEd25519->>RustLib: sign
RustLib->>Ed25519DalekBip32: try_sign
Ed25519DalekBip32-->>RustLib: Signature
RustLib-->>HDKeyEd25519: Ed25519DalekSignature
HDKeyEd25519-->>Client: Signature bytes
Possible Issues
Security Hotspots
|
Resolves brave/brave-browser#42579
SecReview: https://github.com/brave/reviews/issues/1808
ed25519-dalek-bip32
and some related crates.ED25519_*
functions from OpenSSL as a replacement.Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: