Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
crypto: use SLIP10 for ed25519 key derivation for ts and cli #4524
crypto: use SLIP10 for ed25519 key derivation for ts and cli #4524
Changes from all commits
3fa3808
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
in a follow up pr, this test can be merged with keytool_test (this test class can be deprecated)
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.
<3
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.
👀 I don't quite agree to use 54 for Secp256k1 if we follow bip44.
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.
@5kbpers what do you suggest?
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.
@kchalkias IMO just using 44 is fine, otherwise some developers may be confused that we did not follow the standard.
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.
@5kbpers We need a way to distinguish between different key types. We realized other chains that support multiple schemes do that as well (usually for multi-sig), and we also picked 54 because there is no BIP54 (to avoid causing any confusion). Note that down the line Sui will support many key types and wallets should pick their favorite, but we need consistency on the deterministic derivation to allow for key (mnemonics) working with more than one vendors.
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.
Ed25519 uses purpose as 44 and it would be the recommended signing scheme.
we want to explicitly use a different derivation path for each signature scheme, and purpose level would be the most appropriate to use.
while it's non-standard to use purpose 54 for bip44, it's used by other currencies such as bitcoin to signify different signature schemes using purpose as something else (https://github.com/trezor/trezor-firmware/blob/master/docs/misc/coins-bip44-paths.md#notes ) also eth2 BLS validator key derivation. (https://eips.ethereum.org/EIPS/eip-2334)
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.
@joyqvq @kchalkias Thanks for your kind explanation! Understood what we were concerned about, now I think it looks good to me.
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.
In a future PR let's have the
seed
as a distinct struct vs plain [u8]. Fine to merge as it is now; this will be a generic crypto refactoring.